The Rmarkdown notebooks in this directory are as follows. Each notebook also has a corresponding HTML file, which is the rendered output from running the code.
01_dataprep.Rmdcreates the training and test datasets
02_basic_models.Rmdfits a range of simple time series models to the data, including ARIMA and ETS.
02a_reg_models.Rmdadds independent variables as regressors to the ARIMA model.
02b_prophet_models.Rmdfits some simple models using the Prophet algorithm.
If you want to run the code in the notebooks interactively, you must start from
01_dataprep.Rmd and proceed in sequence, as the earlier notebooks will generate artifacts (datasets/model objects) that are used by later ones.
The following packages are needed to run the basic analysis notebooks in this directory:
It’s likely that you will already have many of these (particularly the Tidyverse packages) installed, if you use R for data science tasks. The main exceptions are the packages in the Tidyverts family, which is a modern framework for time series analysis building on the Tidyverse.
install.packages("tidyverse") # installs all tidyverse packages install.packages("rmarkdown") install.packages("here") install.packages(c("tsibble", "fable", "feasts"))
The following packages are needed to run the Prophet analysis notebook:
While prophet is available from CRAN, its frontend for the tidyverts framework, fable.prophet, is currently on GitHub only. You can install these packages with
install.packages("prophet") install.packages("https://github.com/mitchelloharawild/fable.prophet/archive/master.tar.gz", repos=NULL)