Learn R Programming

fpp2

Overview

The R package fpp2 loads data required for the examples and exercises used in the book Forecasting: Principles and Practice (2nd edition) by Rob J Hyndman and George Athanasopoulos. It also loads several packages needed to do the analysis described in the book.

Installation

You can install the stable version from CRAN.

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

You can install the development version from Github

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

Usage

library(fpp2) will load the following packages:

  • forecast, for forecasting methods and some data sets.
  • ggplot2, for data visualisation.
  • fma, for data taken from the book “Forecasting: methods and applications” by Makridakis, Wheelwright and Hyndman (1998).
  • expsmooth, for data taken from the book “Forecasting with Exponential Smoothing” by Hyndman, Koehler, Ord and Snyder (2008).

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

library(fpp2)
#> Registered S3 method overwritten by 'quantmod':
#>   method            from
#>   as.zoo.data.frame zoo
#> ── Attaching packages ────────────────────────────────────────────── fpp2 2.5 ──
#> ✔ ggplot2   3.4.0     ✔ fma       2.5  
#> ✔ forecast  8.20      ✔ expsmooth 2.4
#> 

Copy Link

Version

Install

install.packages('fpp2')

Monthly Downloads

11,424

Version

2.5

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Rob Hyndman

Last Published

February 19th, 2023

Functions in fpp2 (2.5)

austa

International visitors to Australia
arrivals

International Arrivals to Australia
a10

Monthly anti-diabetic drug subsidy in Australia from 1991 to 2008.
ausair

Air Transport Passengers Australia
calls

Call volume for a large North American bank
austourists

International Tourists to Australia: Total visitor nights.
ausbeer

Quarterly Australian Beer production
elecsales

Electricity sales to residential customers in South Australia.
elecequip

Electrical equipment manufactured in the Euro area.
insurance

Insurance quotations and advertising expenditure.
elecdemand

Half-hourly and daily electricity demand for Victoria, Australia, in 2014
livestock

Livestock (sheep) in Asia, 1961-2007.
fpp2_conflicts

Conflicts between fpp2 packages and other packages
fpp2-package

fpp2: Data for "Forecasting: Principles and Practice" (2nd Edition)
euretail

Quarterly retail trade: Euro area.
marathon

Boston marathon winning times since 1897
melsyd

Total weekly air passenger numbers on Ansett airline flights between Melbourne and Sydney, 1987--1992.
debitcards

Retail debit card usage in Iceland.
goog

Daily closing stock prices of Google Inc
maxtemp

Maximum annual temperatures at Moorabbin Airport, Melbourne
departures

Total monthly departures from Australia
guinearice

Rice production (Guinea)
oil

Annual oil production in Saudi Arabia
fpp2_packages

List all packages loaded by fpp2
qgas

Quarterly Australian Gas Production
hyndsight

Daily pageviews for the Hyndsight blog. 30 April 2014 to 29 April 2015.
h02

Monthly corticosteroid drug subsidy in Australia from 1991 to 2008.
sunspotarea

Annual average sunspot area (1875-2015)
gasoline

US finished motor gasoline product supplied.
mens400

Winning times in Olympic men's 400m track final. 1896-2016.
uschange

Growth rates of personal consumption and personal income in the USA.
prison

prison
wmurders

Annual female murder rate (per 100,000 standard population) in the USA. 1950-2004.
visnights

Quarterly visitor nights for various regions of Australia.
qcement

Quarterly Australian Portland Cement production
qauselec

Quarterly Australian Electricity production
usmelec

Electricity monthly total net generation. January 1973 - June 2013.
auscafe

Monthly expenditure on eating out in Australia