fpp3 package update

Date

26 June 2024

Topics
forecasting
R
teaching
The fpp3 package has had its first major update since the book was published.

The fpp3 package is a companion to the book Forecasting: Principles and Practice (3rd edition, Hyndman & Athanasopoulos, OTexts). When you load the package, it loads the data and functions needed for the examples in the book.

library(fpp3)
── Attaching packages ──────────────────────────────────────────── fpp3 1.0.0 ──
✔ tibble      3.2.1     ✔ tsibble     1.1.4
✔ dplyr       1.1.4     ✔ tsibbledata 0.4.1
✔ tidyr       1.3.1     ✔ feasts      0.3.2
✔ lubridate   1.9.3     ✔ fable       0.3.4
✔ ggplot2     3.5.1     ✔ fabletools  0.4.2
── Conflicts ───────────────────────────────────────────────── fpp3_conflicts ──
✖ lubridate::date()    masks base::date()
✖ dplyr::filter()      masks stats::filter()
✖ tsibble::intersect() masks base::intersect()
✖ tsibble::interval()  masks lubridate::interval()
✖ dplyr::lag()         masks stats::lag()
✖ tsibble::setdiff()   masks base::setdiff()
✖ tsibble::union()     masks base::union()

This provides a shorthand way of attaching the packages needed for most time series forecasting tasks, using packages from the tidyverts, just as the tidyverse package does for data manipulation and visualization.

In the most recent update, we have added many new data sets that can be used as examples by instructors, or for users to practice their forecasting skills.

Each of these new data sets were previously used in an exam for the forecasting subjects taught by George Athanasopoulos and me at Monash University. Three of our exams are available online for those who are interested to see how we assess forecasting students.

Each year, we take a new data set, and write the exam around how to analyse the time series. We strongly believe in assessing students on their forecasting skills with real data, rather than using artificial data, or asking technical questions that are not relevant to real-world forecasting. As a result, our exams are quite different from anything we have seen elsewhere.

We also think it is best to use “fresh and local”1 data sets. So the data are almost always from Australia, and included data up to about a month before the exam was written.

In the latest update to the fpp3 package, we have expanded these data sets to cover more series than we did in the exams, and in most cases updated them to include more recent observations.

The new data sets are:

Thanks to Nuwani Palihawadana and Shanika Wickramasuriya for most of the work on this latest update, completed at the NUMBAT hackathon last month.

Footnotes

  1. Thanks to Di Cook for this phrase.↩︎