Time series analysis in the `tidyverse`
anomalize
R package is now available in timetk
:
anomlize()
: 1 function that breaks down, identifies, and cleans anomaliesplot_anomalies()
: Visualize the anomalies and anomaly bandsplot_anomalies_decomp()
: Visualize the time series decomposition. Make adjustments as needed.plot_anomalies_cleaned()
: Visualize the before/after of cleaning anomalies.Note - anomalize(.method)
: Only the .method = "stl"
is supported at this time. The "twitter"
method is also planned.
New Features
Many of the plotting functions have been upgraded for use with trelliscopejs
for
easier visualization of many time series.
plot_time_series()
:
trelliscope
: Used for visualizing many time series..facet_strip_remove
to remove facet strips since trelliscope is automatically labeled..facet_nrow
to adjust grid with trelliscope.facet_collapse = TRUE
was changed to FALSE
for better compatibility with Trelliscope JS. This may cause some plots to have multiple groups take up extra space in the strip.plot_time_series_boxplot()
:
trelliscope
: Used for visualizing many time series..facet_strip_remove
to remove facet strips since trelliscope is automatically labeled..facet_nrow
to adjust grid with trelliscope..facet_collapse = TRUE
was changed to FALSE
for better compatibility with Trelliscope JS. This may cause some plots to have multiple groups take up extra space in the strip.plot_anomaly_diagnostics()
:
trelliscope
: Used for visualizing many time series..facet_strip_remove
to remove facet strips since trelliscope is automatically labeled..facet_nrow
to adjust grid with trelliscope..facet_collapse = TRUE
was changed to FALSE
for better compatibility with Trelliscope JS. This may cause some plots to have multiple groups take up extra space in the strip.Updates & Bug Fixes
Recipes steps (e.g. step_timeseries_signature()
) use the new recipes::print_step()
function. Requires recipes >= 0.2.0
. #110
Offset parameter in step_log_interval()
was not working properly. Now works. #103
Potential Breaking Changes
.facet_collapse = TRUE
was changed to FALSE
for better compatibility with Trelliscope JS. This may cause some plots to have multiple groups take up extra space in the strip.New Features
tk_tsfeatures()
: A new function that makes it easy to generate time series feature matrix using tsfeatures
. The main benefit is that you can pipe time series data in tibbles
with dplyr
groups. The features will be produced by group. #95 #84
plot_time_series_boxplot()
: A new function that makes plotting time series boxplots simple using a .period
argument for time series aggregation.
New Vignettes
tk_tsfeatures()
function to perform time series clustering. #95 #84plot_time_series_boxplot()
and plot_time_series_regression()
.Improvements
Improvements for point forecasting when the target is n-periods into the future.
time_series_cv()
, time_series_split()
: New parameter point_forecast
. This is useful for testing / assessing the n-th prediction in the future. When set to TRUE
, will return a single point that returns on the last value in assess
.Fixes
plot_time_series()
: Smoother no longer fails when time series has 1 observation #106Improvements
summarize_by_time()
: Added a .week_start
argument to allow specifying .week_start = 1
for Monday start. Default is 7 for Sunday Start. This can also be changed with the lubridate
by setting the lubridate.week.start
option.
Plotting Functions:
.facet_dir
argument for adjusting the direction of facet_wrap(dir)
. #94plot_acf_diagnostics()
): Change default parameter to .show_white_noise_bars = TRUE
. #85plot_timeseries_regression()
: Can now show_summary
for group-wise models when visualizing groupsTime Series CV (time_series_cv()
): Add Label for tune_results
Improve speed of pad_by_time()
. #93
Bug Fixes
tk_make_timeseries()
and tk_make_future_timeseries()
are now able to handle end of months. #72
tk_tbl.zoo()
: Fix an issue when readr::type_convert()
produces warning messages about not having character columns in inputs. #89
plot_time_series_regression()
: Fixed an issue when lags are added to .formula
. Pads lags with NA.
step_fourier()
and fourier_vec()
: Fixed issue with step_fourier failing with one observation. Added scale_factor argument to override date sequences with the stored scale factor. #77