Travis build status codecov CRAN_Status_Badge


To make it easy to visualize, wrangle, and feature engineer time series data for forecasting and machine learning prediction.


Package Functionality

There are many R packages for working with Time Series data. Here’s how timetk compares to the “tidy” time series R packages for data visualization, wrangling, and feature engineeering (those that leverage data frames or tibbles).

Task timetk tsibble feasts tibbletime
Data Structure tibble (tbl) tsibble (tbl_ts) tsibble (tbl_ts) tibbletime (tbl_time)
Interactive Plots (plotly) :x: :x: :x:
Static Plots (ggplot) :x: :x:
Time Series :x: :x:
Correlation, Seasonality :x: :x:
Anomaly Detection :x: :x: :x:
Data Wrangling
Time-Based Summarization :x: :x:
Time-Based Filtering :x: :x:
Padding Gaps :x: :x:
Low to High Frequency :x: :x: :x:
Imputation :x: :x:
Sliding / Rolling :x:
Feature Engineering (recipes)
Date Feature Engineering :x: :x: :x:
Holiday Feature Engineering :x: :x: :x:
Fourier Series :x: :x: :x:
Smoothing & Rolling :x: :x: :x:
Padding :x: :x: :x:
Imputation :x: :x: :x:
Cross Validation (rsample)
Time Series Cross Validation :x: :x: :x:
Time Series CV Plan Visualization :x: :x: :x:
More Awesomeness
Making Time Series (Intelligently) :x:
Handling Holidays & Weekends :x: :x: :x:
Class Conversion :x: :x:
Automatic Frequency & Trend :x: :x: :x:

What can you do in 1 line of code?

Investigate a time series…

taylor_30_min %>%
    plot_time_series(date, value, .color_var = week(date), 
                     .interactive = FALSE, .color_lab = "Week")

Visualize anomalies…

walmart_sales_weekly %>%
    group_by(Store, Dept) %>%
    plot_anomaly_diagnostics(Date, Weekly_Sales, 
                             .facet_ncol = 3, .interactive = FALSE)

Make a seasonality plot…

taylor_30_min %>%
    plot_seasonal_diagnostics(date, value, .interactive = FALSE)

Inspect autocorrelation, partial autocorrelation (and cross correlations too)…

taylor_30_min %>%
    plot_acf_diagnostics(date, value, .lags = "1 week", .interactive = FALSE)


What are you waiting for? Download the development version with latest features:

# install.packages("devtools")

Or, download CRAN approved version:



The timetk package wouldn’t be possible without other amazing time series packages.

Learning More

If you are interested in learning from my advanced Time Series Analysis & Forecasting Course, then join my waitlist. The course is coming soon.

You will learn:

Signup for the Time Series Course waitlist