Overview

The fpp3 package contains data used in the book Forecasting: Principles and Practice (3rd edition) by Rob J Hyndman and George Athanasopoulos. It also loads several packages needed to do the analysis described in the book. These packages work with the tidyverse set of packages, sharing common data representations and API design.

Installation

You can install the stable version from CRAN.

install.packages('fpp3', dependencies = TRUE)

You can install the development version from Github

# install.packages("remotes")
remotes::install_github("robjhyndman/fpp3-package")

Usage

library(fpp3) will load the following packages:

  • tibble, for tibbles, a modern re-imagining of data frames.
  • dplyr, for data manipulation.
  • tidyr, to easily tidy data using spread() and gather().
  • lubridate, for date/times.
  • ggplot2, for data visualisation.
  • tsibble, for tsibbles, a time series version of a tibble.
  • tsibbledata, various time series data sets in the form of tsibbles.
  • feasts, for features and statistics of time series.
  • fable, for fitting models and producing forecasts.

You also get a condensed summary of conflicts with other packages you have loaded:

library(fpp3)
#> ── Attaching packages ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── fpp3 0.3 ──
#> ✓ tibble      3.0.3     ✓ tsibble     0.9.2
#> ✓ dplyr       1.0.2     ✓ tsibbledata 0.2.0
#> ✓ tidyr       1.1.2     ✓ feasts      0.1.5
#> ✓ lubridate   1.7.9     ✓ fable       0.2.1
#> ✓ ggplot2     3.3.2
#> ── Conflicts ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── fpp3_conflicts ──
#> x lubridate::date()   masks base::date()
#> x dplyr::filter()     masks stats::filter()
#> x tsibble::interval() masks lubridate::interval()
#> x dplyr::lag()        masks stats::lag()