These are references that I followed while investigating how to analyze time series with the R language.
Review of pre-tidyverse libraries
Abraham Mathew. 2019-08-18. Packages for Getting Started with Time Series Analysis in R. Blog post.
Time series libraries compatible with the tidyverse
Rob Hyndman: R libraries
- Tidy tools for time series.
- tsibble: Tidy Temporal Data Frames and Tools.
- fable: Forecasting Models for Tidy Time Series.
- feasts: Feature Extraction and Statistics for Time Series.
Related presentations:
- Rob J. Hyndman. 2020-01-27. Tidy Time Series and Forecasting in R. rstudio::conf 2020. 2-day workshop.
- Rob J. Hyndman. 2018-07-13. Tidy Forecasting in R. useR2018. 14 minutes.
Related blog posts:
- Rob Hyndman. 2021-05-16. Time series cross-validation using fable.
Matt Dancho: R libraries
Facebook: prophet
package
- Prophet: Forecasting at scale. home page.
- prophet package: Automatic Forecasting Procedure.
- “Implements a procedure for forecasting time series data based on an additive model where non-linear trends are fit with yearly, weekly, and daily seasonality, plus holiday effects. It works best with time series that have strong seasonal effects and several seasons of historical data. Prophet is robust to missing data and shifts in the trend, and typically handles outliers well.”
- Prophet Quick Start. documentation.
- Sean J. Taylor, Ben Letham. 2017-02-23. Prophet: forecasting at scale. Blog post.
- Time series forecasting with Prophet. Coursera Guided Project. 1-hour project.
Twitter: AnomalyDetection
- AnomalyDetection. GitHub repository.
Google: CausalImpact
package
- CausalImpact: Inferring Causal Effects using Bayesian Structural Time-Series Models.
- CausalImpact: An R package for causal inference in time series.
- GitHub repository.
Online Courses
Free Courses
Coursera: Intro to Time Series Analysis in R
Vinod Bakthavachalam. Intro to Time Series Analysis in R. Coursera Guided Project.
- Introduction to basic terminology for time series.
- Shows how to build several types of models and then forecast with them: AR(p), MA(q), ARMA(p,q), ARIMA(p,d,q), STL.
- Relies mostly on the forecast package, including
forecast::auto.arima
to create models. - The syllabus says it is a 2-hour project-based course. However it took me twice that long, because I stopped to look up terms and experimented with sample code.
SUNY Online: Practical Time Series Analysis
Tural Sadigov, William Thistleton. Practical Time Series Analysis. 6-week course.
- “If you are on the job and all of a sudden you have to look at time series data, and your mathematical background did not include a study of time series or stochastic processes, this course will help give you a nice overview, a very practical approach to where time series come from and how people manage them.”
Coursera: Time series forecasting with Prophet
Time series forecasting with Prophet. Coursera Guided Project. 1-hour project.
Georgia Institute of Technology: Introduction to Analytics Modeling
Introduction to Analytics Modeling. Free online course at edX. Week 3 covers “Time Series Models”.
Paid Courses
Matt Dancho: High-Performance Time Series Forecasting course
https://university.business-science.io/p/ds4b-203-r-high-performance-time-series-forecasting/
Cost: $499
Summary:
- Part 1 - Feature Engineering with timetk
- Part 2 - Machine Learning with modeltime
- Part 3 - Deep Learning with GluonTS
- Challenges & Cheat Sheets
Details:
- part 1: Feature Engineering
- Competition overview: 5 competitions and strategies that won. 30 min.
- TS Jumpstart. 1+ hr.
- Visualization. 1.5 hr.
- Wrangling. 1.5 hr.
- Transformation. 1.5 hr.
- Feature engineering. 3 hr.
- Part 2: Machine Learning and Forecasting
- ARIMA: 1.5 hrs.
- Prophet: 45 min.
- ETS, TBATS, Seasonal Decomp. 1 hr.
- Machine Learning: GLMNet, KNN, RF, XGBoost, Rule Based. 2 hrs.
- Boosted algorithms: Prophet, ARIMA. 30 min.
- Hyper Parameter Tuning and Cross Validation. 1+ hrs.
- Scalable Modeling and Time Series Groups. 1+ hrs.
- Ensemble approaches: Averaging, Stacking. 1+ hrs.
- Part 3: Deep Learning
- Deep Learning. several hours.
- DeepAR
- DeepVAR
- NBeats
- and more!
- Deep Learning. several hours.
Use 3 libraries:
- timetk
- data wrangling
- visualization
- feature engineering
- modeltime
- fast experimentation with many software models.
- GluonTS
- Python library is part of mxnet.
- Deep Learning for time series.
- developed at Amazon.
- Use Reticulate to combine Gluon and R.
Related blog posts:
- Time Series in 5-Minutes
- Part 1: Data Wrangling and Rolling Calculations
- Part 2: The Time Plot
- Part 3: Autocorrelation
- Part 4: Seasonality
- Part 5: Anomalies and Anomaly Detection
- Part 6: Modeling Time Series Data
Releated podcasts:
- SuperDataScience. SDS 463: Time Series Analysis. Jon Krohn interviews Matt Dancho. See especially:
- Matt’s 6 time series models [14:11]
- Timetk [15:02]
- Modeltime [29:32]
- Gluon package [36:04]
R Books
- Rob J. Hyndman. 2021. Forecasting: Principles and Practice, 3rd edition. Free to read online.
- Galit Shmueli, Kenneth C. Lichtendahl Jr. 2016. Practical Time Series Forecasting with R: A Hands-On Guide. 2nd Edition.
Python Books
- Aileen Nielsen. 2019. Practical Time Series Analysis. O’Reilly Media, Inc.
- B.V. Vishwas, Ashish Patel. 2020. Hands-on Time Series Analysis with Python: From Basics to Bleeding Edge Techniques. Apress.
Copyright © 2021 Jim Tyhurst
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.