Changelog
Source:NEWS.md
timetk 2.8.1
CRAN release: 20220531
timetk 2.8.0
CRAN release: 20220407
New Features
Many of the plotting functions have been upgraded for use with trelliscopejs
for easier visualization of many time series.

plot_time_series()
: Gets a new argument
trelliscope
: Used for visualizing many time series.  Gets a new argument
.facet_strip_remove
to remove facet strips since trelliscope is automatically labeled.  Gets a new argument
.facet_nrow
to adjust grid with trelliscope.  The default argument for
facet_collapse = TRUE
was changed toFALSE
for better compatibility with Trelliscope JS. This may cause some plots to have multiple groups take up extra space in the strip.
 Gets a new argument

plot_time_series_boxplot()
: Gets a new argument
trelliscope
: Used for visualizing many time series.  Gets a new argument
.facet_strip_remove
to remove facet strips since trelliscope is automatically labeled.  Gets a new argument
.facet_nrow
to adjust grid with trelliscope.  The default argument for
.facet_collapse = TRUE
was changed toFALSE
for better compatibility with Trelliscope JS. This may cause some plots to have multiple groups take up extra space in the strip.
 Gets a new argument

plot_anomaly_diagnostics()
: Gets a new argument
trelliscope
: Used for visualizing many time series.  Gets a new argument
.facet_strip_remove
to remove facet strips since trelliscope is automatically labeled.  Gets a new argument
.facet_nrow
to adjust grid with trelliscope.  The default argument for
.facet_collapse = TRUE
was changed toFALSE
for better compatibility with Trelliscope JS. This may cause some plots to have multiple groups take up extra space in the strip.
 Gets a new argument
Updates & Bug Fixes
Recipes steps (e.g.
step_timeseries_signature()
) use the newrecipes::print_step()
function. Requiresrecipes >= 0.2.0
. #110Offset parameter in
step_log_interval()
was not working properly. Now works. #103
Potential Breaking Changes
 The default argument for
.facet_collapse = TRUE
was changed toFALSE
for better compatibility with Trelliscope JS. This may cause some plots to have multiple groups take up extra space in the strip.
timetk 2.7.0
CRAN release: 20220119
New Features
tk_tsfeatures()
: A new function that makes it easy to generate time series feature matrix usingtsfeatures
. The main benefit is that you can pipe time series data intibbles
withdplyr
groups. The features will be produced by group. #95 #84plot_time_series_boxplot()
: A new function that makes plotting time series boxplots simple using a.period
argument for time series aggregation.
New Vignettes
Time Series Clustering: Uses the new
tk_tsfeatures()
function to perform time series clustering. #95 #84Time Series Visualization: Updated to include
plot_time_series_boxplot()
andplot_time_series_regression()
.
Improvements
Improvements for point forecasting when the target is nperiods into the future.

time_series_cv()
,time_series_split()
: New parameterpoint_forecast
. This is useful for testing / assessing the nth prediction in the future. When set toTRUE
, will return a single point that returns on the last value inassess
.
Fixes
 Updates for rlang > 0.4.11 (dev version) #98

plot_time_series()
: Smoother no longer fails when time series has 1 observation #106
timetk 2.6.2
CRAN release: 20211116
Improvements
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 thelubridate
by setting thelubridate.week.start
option.
Plotting Functions:
 Several plotting functions gain a new
.facet_dir
argument for adjusting the direction offacet_wrap(dir)
. #94  Plot ACF Diagnostics (
plot_acf_diagnostics()
): Change default parameter to.show_white_noise_bars = TRUE
. #85 
plot_timeseries_regression()
: Can nowshow_summary
for groupwise models when visualizing groups
 Several plotting functions gain a new
Time Series CV (
time_series_cv()
): Add Label fortune_results
Improve speed of
pad_by_time()
. #93
Bug Fixes
tk_make_timeseries()
andtk_make_future_timeseries()
are now able to handle end of months. #72tk_tbl.zoo()
: Fix an issue whenreadr::type_convert()
produces warning messages about not having character columns in inputs. #89plot_time_series_regression()
: Fixed an issue when lags are added to.formula
. Pads lags with NA.step_fourier()
andfourier_vec()
: Fixed issue with step_fourier failing with one observation. Added scale_factor argument to override date sequences with the stored scale factor. #77
timetk 2.6.1
CRAN release: 20210118
Improvements

tk_augment_slidify()
,tk_augment_lags()
,tk_augment_leads()
,tk_augment_differences()
: Now works with multiple columns (passed via.value
) andtidyselect
(e.g.contains()
).
Fixes
 Reduce “New names” messages.
#> New names:
#> * NA > ...1
timetk 2.6.0
CRAN release: 20201121
New Functions

filter_period()
(#64): Applies filtering expressions within timebased periods (windows). 
slice_period()
(#64): Applies slices within timebased periods (windows). 
condense_period()
(#64): Converts a periodicity from a higher (e.g. daily) to lower (e.g. monthly) frequency. Similar toxts::to.period()
andtibbletime::as_period()
. 
tk_augment_leads()
andlead_vec()
(#65): Added to make it easier / more obvious on how to create leads.
Fixes

time_series_cv()
: Fix bug with Panel Data. Train/Test Splits only returning 1st observation in final time stamp. Should return all observations. 
future_frame()
andtk_make_future_timeseries()
: Now sort the incoming index to ensure dates returned go into the future. 
tk_augment_lags()
andtk_augment_slidify()
: Now overwrite column names to match the behavior oftk_augment_fourier()
andtk_augment_differences()
.
timetk 2.5.0
CRAN release: 20201022
Improvements

time_series_cv()
: Now works with time series groups. This is great for working with panel data. 
future_frame()
: Gets a new argument called.bind_data
. When set toTRUE
, it performs a data binding operation with the incoming data and the future frame.
Miscellaneous
 Tune startup messages (#63)
timetk 2.4.0
CRAN release: 20201008

step_slidify_augment()
 A variant of step slidify that adds multiple rolling columns inside of a recipe.
Bug Fixes
 Add warning when
%+time%
and%time%
return missing values  Fix issues with
tk_make_timeseries()
andtk_make_future_timeseries()
providing odd results for regular time series. GitHub Issue 60
timetk 2.3.0
CRAN release: 20200929
New Functionality
tk_time_series_cv_plan()
 Now works with kfold cross validation objects fromvfold_cv()
function.pad_by_time()
 Added new argument.fill_na_direction
to specify atidyr::fill()
strategy for filling missing data.
Bug Fixes
 Augment functions (e.g.
tk_augment_lags()
)  Fix bug with grouped functions not being exported  Vectorized Functions  Compatabiliy with
ts
class
timetk 2.2.1
CRAN release: 20200901
New Functions

step_log_interval_vec()
 Extends thelog_interval_vec()
forrecipes
preprocessing.
Parallel Processing
 Parallel backend for use with
tune
andrecipes
Bug Fixes

log_interval_vec()
 Correct the messaging 
complement.ts_cv_split
 Helper to show time series cross validation splits in list explorer.
timetk 2.2.0
CRAN release: 20200718
New Functions

mutate_by_time()
: For applying mutates by time windows 
log_interval_vec()
&log_interval_inv_vec()
: For constrained interval forecasting.
Improvements

plot_acf_diagnostics()
: A new argument,.show_white_noise_bars
for adding white noise bars to an ACF / PACF Plot. 
pad_by_time()
: New arguments.start_date
and.end_date
for expanding/contracting the padding windows.
timetk 2.1.0
CRAN release: 20200703
New Functions

plot_time_series_regression()
: Convenience function to visualize & explore features using Linear Regression (stats::lm()
formula). 
time_series_split()
: A convenient way to return a single split fromtime_series_cv()
. Returns the split in the same format asrsample::initial_time_split()
.
Improvements

Autodetect date and datetime: Affects
summarise_by_time()
,filter_by_time()
,tk_summary_diagnostics

tk_time_series_cv_plan()
: Allow a single resample fromrsample::initial_time_split
ortimetk::time_series_split

Updated Vignette: The vignette, “Forecasting Using the Time Series Signature”, has been updated with
modeltime
andtidymodels
.
Plotting Improvements
 All plotting functions now support Tab Completion (a minor breaking change was needed to do so, see breaking changes below)

plot_time_series()
: Add
.legend_show
to toggle on/off legends.  Permit numeric index (fix issue with smoother failing)
 Add
Breaking Changes

Tab Completion: Replace
...
with.facet_vars
or.ccf_vars
. This change is needed to improve tabcompletion. It affects :
Bug Fixes

fourier_vec()
andstep_fourier_vec()
: Add error if observations have zero difference. Issue #40.
timetk 2.0.0
CRAN release: 20200531
New Interactive Plotting Functions

plot_anomaly_diagnostics()
: Visualize Anomalies for One or More Time Series
New Data Wrangling Functions

future_frame()
: Make a future tibble from an existing timebased tibble.
New Diagnostic / Data Processing Functions

tk_anomaly_diagnostics()
 Groupwise anomaly detection and diagnostics. A wrapper for theanomalize
R package functions without importinganomalize
.
New Vectorized Functions:

ts_clean_vec()
 Replace Outliers & Missing Values in a Time Series 
standardize_vec()
 Centers and scales a time series to mean 0, standard deviation 1 
normalize_vec()
 Normalizes a time series to Range: (0, 1)
New Recipes Preprocessing Steps:

step_ts_pad()
 Preprocessing for padding time series data. Adds rows to fill in gaps and can be used withstep_ts_impute()
to interpolate going from low to high frequency! 
step_ts_clean()
 Preprocessing step for cleaning outliers and imputing missing values in a time series.
New Parsing Functions

parse_date2()
andparse_datetime2()
: These are similar toreadr::parse_date()
andlubridate::as_date()
in that they parse character vectors to date and datetimes. The key advantage is SPEED.parse_date2()
usesanytime
package to process using C++Boost.Date_Time
library.
Improvements:

plot_acf_diagnostics()
: The.lags
argument now handles timebased phrases (e.g..lags = "1 month"
). 
time_series_cv()
: Implements timebased phrases (e.g.initial = "5 years"
andassess = "1 year"
) 
tk_make_future_timeseries()
: Then_future
argument has been deprecated for a newlength_out
argument that accepts both numeric input (e.g.length_out = 12
) and timebased phrases (e.g.length_out = "12 months"
). A major improvement is that numeric values define the number of timestamps returned even if weekends are removed or holidays are removed. Thus, you can always anticipate the length. (Issue #19). 
diff_vec
: Now reports the initial values used in the differencing calculation.
Bug Fixes:

plot_time_series()
: Fix name collision when
.value = .value
.
 Fix name collision when

tk_make_future_timeseries()
: Respect timezones

time_series_cv()
: Fix incorrect calculation of starts/stops
 Make
skip = 1
default.skip = 0
does not make sense.  Fix issue with
skip
adding 1 to stops.  Fix printing method

plot_time_series_cv_plan()
&tk_time_series_cv_plan()
: Prevent name collisions when underlying data has column “id” or “splits”

tk_make_future_timeseries()
: Fix bug when day of month doesn’t exist. Lubridate
period()
returnsNA
. Fix implemented withceiling_date()
.
 Fix bug when day of month doesn’t exist. Lubridate

pad_by_time()
: Fix
pad_value
so only inserts pad values where new row was inserted.
 Fix

step_ts_clean()
,step_ts_impute()
: Fix issue with
lambda = NULL
 Fix issue with
Breaking Changes:
These should not be of major impact since the 1.0.0 version was just released.
 Renamed
impute_ts_vec()
tots_impute_vec()
for consistency withts_clean_vec()
 Renamed
step_impute_ts()
tostep_ts_impute()
for consistency with underlying function  Renamed
roll_apply_vec()
toslidify_vec()
for consistency withslidify()
& relationship toslider
R package  Renamed
step_roll_apply
tostep_slidify()
for consistency withslidify()
& relationship toslider
R package  Renamed
tk_augment_roll_apply
totk_augment_slidify()
for consistency withslidify()
& relationship toslider
R package 
plot_time_series_cv_plan()
andtk_time_series_cv_plan()
: Changed argument from.rset
to.data
.
timetk 1.0.0
CRAN release: 20200419
New Interactive Plotting Functions:

plot_time_series()
 A workhorse timeseries plotting function that generates interactiveplotly
plots, consolidates 20+ lines ofggplot2
code, and scales well to many time series using dplyr groups. 
plot_acf_diagnostics()
 Visualize the ACF, PACF, and any number of CCFs in one plot for Multiple Time Series. Interactiveplotly
by default. 
plot_seasonal_diagnostics()
 Visualize Multiple Seasonality Features for One or More Time Series. Interactiveplotly
by default. 
plot_stl_diagnostics()
 Visualize STL Decomposition Features for One or More Time Series. 
plot_time_series_cv_plan()
 Visualize the Time Series Cross Validation plan made withtime_series_cv()
.
New Time Series Data Wrangling:

summarise_by_time()
 A timebased variant ofdplyr::summarise()
for flexible summarization using common timebased criteria. 
filter_by_time()
 A timebased variant ofdplyr::filter()
for flexible filtering by timeranges. 
pad_by_time()
 Insert time series rows with regularly spaced timestamps. 
slidify()
 Make any function a rolling / sliding function. 
between_time()
 A timebased variant ofdplyr::between()
for flexible timerange detection. 
add_time()
 Add for time series index. Shifts an index by aperiod
.
New Recipe Functions:
Feature Generators:

step_holiday_signature()
 New recipe step for adding 130 holiday features based on individual holidays, locales, and stock exchanges / business holidays. 
step_fourier()
 New recipe step for adding fourier transforms for adding seasonal features to time series data 
step_roll_apply()
 New recipe step for adding rolling summary functions. Similar torecipes::step_window()
but is more flexible by enabling application of any summary function. 
step_smooth()
 New recipe step for adding Local Polynomial Regression (LOESS) for smoothing noisy time series 
step_diff()
 New recipe for adding multiple differenced columns. Similar torecipes::step_lag()
. 
step_box_cox()
 New recipe for transforming predictors. Similar tostep_BoxCox()
with improvements for forecasting including “guerrero” method for lambda selection and handling of negative data. 
step_impute_ts()
 New recipe for imputing a time series.
New Rsample Functions

time_series_cv()
 Creatersample
cross validation sets for time series. This function produces a sampling plan starting with the most recent time series observations, rolling backwards.
New Vector Functions:
These functions are useful on their own inside of mutate()
and power many of the new plotting and recipes functions.

roll_apply_vec()
 Vectorized rolling apply function  wrapsslider::slide_vec()

smooth_vec()
 Vectorized smoothing function  Applies Local Polynomial Regression (LOESS) 
diff_vec()
anddiff_inv_vec()
 Vectorized differencing function. PadsNA
’s by default (unlikestats::diff
). 
lag_vec()
 Vectorized lag functions. Returns both lags and leads (negative lags) by adjusting the.lag
argument. 
box_cox_vec()
,box_cox_inv_vec()
, &auto_lambda()
 Vectorized Box Cox transformation. Leveragesforecast::BoxCox.lambda()
for automatic lambda selection. 
fourier_vec()
 Vectorized Fourier Series calculation. 
impute_ts_vec()
 Vectorized imputation of missing values for time series. Leveragesforecast::na.interp()
.
New Augment Functions:
All of the functions are designed for scale. They respect dplyr::group_by()
.

tk_augment_holiday_signature()
 Add holiday features to adata.frame
using only a timeseries index. 
tk_augment_roll_apply()
 Add multiple columns of rolling window calculations to adata.frame
. 
tk_augment_differences()
 Add multiple columns of differences to adata.frame
. 
tk_augment_lags()
 Add multiple columns of lags to adata.frame
. 
tk_augment_fourier()
 Add multiple columns of fourier series to adata.frame
.
New Make Functions:
Make date and datetime sequences between start and end dates.

tk_make_timeseries()
 Super flexible function for creating daily and subdaily time series. 
tk_make_weekday_sequence()
 Weekday sequence that accounts for both stripping weekends and holidays 
tk_make_holiday_sequence()
 Makes a sequence of dates corresponding to business holidays in calendars fromtimeDate
(common nonworking days) 
tk_make_weekend_sequence()
 Weekday sequence of dates for Saturday and Sunday (common nonworking days)
New Get Functions:

tk_get_holiday_signature()
 Get 100+ holiday features using only a timeseries index. 
tk_get_frequency()
andtk_get_trend()
 Automatic frequency and trend calculation from a time series index.
New Diagnostic / Data Processing Functions

tk_summary_diagnostics()
 Groupwise time series summary. 
tk_acf_diagnostics()
 The data preparation function forplot_acf_diagnostics()

tk_seasonal_diagnostics()
 The data preparation function forplot_seasonal_diagnostics()

tk_stl_diagnostics()
 Groupwise STL Decomposition (Season, Trend, Remainder). Data prep forplot_stl_diagnostics()
. 
tk_time_series_cv_plan
 The data preparation function forplot_time_series_cv_plan()
New Datasets
 M4 Competition  Sample “economic” datasets from hourly, daily, weekly, monthly, quarterly, and yearly.
 Walmart Recruiting Retail Sales Forecasting Competition  Sample of 7 retail time series
 Web Traffic Forecasting (Wikipedia) Competition  Sample of 10 website time series
 Taylor’s Energy Demand  Single time series with 30minute interval of energy demand
 UCI Bike Sharing Daily  A time series consisting of Capital Bikesharing Transaction Counts and related timebased features.
Improvements: * tk_make_future_timeseries()
 Now accepts n_future
as a timebased phrase like “12 seconds” or “1 year”.
Bug Fixes:

Don’t set timezone on date  Accommodate recent changes to
lubridate::tz<
which now returns POSIXct when used Date objects. Fixed in PR32 by @vspinu.
Potential Breaking Changes:

tk_augment_timeseries_signature()
 Changed fromdata
to.data
to prevent name collisions when piping.
timetk 0.1.3
CRAN release: 20200318
New Features:

recipes
Integration  Ability to apply time series feature engineering in thetidymodels
machine learning workflow.
step_timeseries_signature()
 Newstep_timeseries_signature()
for adding date and datetime features.

 New Vignette  “Time Series Machine Learning” (previously forecasting using the time series signature)
Bug Fixes:

xts::indexTZ
is deprecated. Usetzone
instead.  Replace
arrange_
witharrange
.  Fix failing tests due to
tidyquant
1.0.0 upagrade (single stocks now return an extra symbol column).