knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.align = "center"
)

tscompdata

The R package tscompdata provides time series data from the following forecasting competitions: M, M3, NN3, NN5, NNGC1, Tourism and GEFCom2012.

The M, M3 and Tourism data are loaded from the Mcomp and Tcomp packages. The remaining data are contained within the tscompdata package.

Installation

You can install the development version from Github with:

# install.packages("devtools")
devtools::install_github("robjhyndman/tscompdata")

Usage

library(tscompdata)
library(ggplot2)

NN3 data

Data from the NN3 forecasting competition, comprising 111 monthly time series each of class ts.

Training and test data are combined. In the competition, the last 18 months were used as test data. Time series NN3-101 to NN3-111 made up the reduced data set from the competition.

head(nn3[[1]])
autoplot(nn3[[1]])

NN5 data

Data from the NN5 forecasting competition, comprising 111 daily time series each of lass msts.

Training and test data are combined. In the competition, the last 56 days were used as test data. Time series NN5-101 to NN5-111 made up the reduced data set from the competition.

head(nn3[[2]])
autoplot(nn5[[2]])

NNGC1 data

Data from the NNGC1 forecasting competition, comprising 11 annual time series, 11 quarterly time series, 11 monthly time series, 11 weekly time series, 11 daily time series and 11 hourly time series each of class ts or msts. Only training data are provided.

head(nngc1[[3]])
autoplot(nngc1[[3]])

GEFCOM2012 load data

Data from the GEFCOM2012 forecasting competition which was hosted on the kaggle platform. The data comprise 20 time series containing hourly load data from 20 zones in the United States, each of class msts. Only training data are provided. The missing data in each series formed the test sets.

head(gefcom2012_load[[4]])
autoplot(gefcom2012_load[[4]])

GEFCOM2012 temperature data

Data from the GEFCOM2012 forecasting competition which held on the kaggle platform. The data comprise 11 time series containing hourly temperature data from 11 weather stations in the United States, each of class msts.

head(gefcom2012_temp[[5]])
autoplot(gefcom2012_temp[[5]])

GEFCOM2012 wind power data

Data from the GEFCOM2012 forecasting competition which held on the kaggle platform. The data comprise 7 hourly time series containing wind power data from 7 wind farms, each of class msts. Only training data are provided. The missing data in each series formed the test sets.

head(gefcom2012_wp[[6]])
autoplot(gefcom2012_wp[[6]])

Mcomp: M1 data

The 1001 time series from the M competition, taken from demography, industry and economics, and ranging in length between 9 and 132 observations. All the data were either non-seasonal (e.g., annual), quarterly or monthly. All the data were positive, which made it possibly to compute mean absolute percentage errors, but is not really reflective of the population of real data.

M1 is of class Mcomp with each time series of class Mdata. The function subset inherited from the Mcomp package can return a subset specified by periods, or types of data or both. See the Mcomp package for more details.

M1
autoplot(M1[[7]])
subset(M1,"monthly")

The 111 series used in the extended comparisons in the 1982 M-competition can be selected as follows.

subset(M1,111)

The data in the Mcomp and Tcomp packages are in the Mcomp class which contains various information used in the competitions including the training and test portions of the time series. The function combine_training_test combines the training data and test data into a single ts object.

m1ts <- combine_training_test(M1)

Mcomp: M3 data

The time series from the M3 forecasting competition and the forecasts from all the original participating methods are stored in M3 and M3Forecast. M3 is a list of 3003 series of class Mcomp. Each series within M3 is of class Mdata. M3Forecast is a list of data.frames. See the Mcomp package for more details.

M3
autoplot(M3[[8]])
subset(M3, "macro")

Tcomp: tourism forecasting competition data

Data from the tourism forecasting competition described in Athanasopoulos, Hyndman, Song and Wu (2011).

tourism is a list of 1,311 series of class Mcomp, and each individual series is an element of class Mdata. See the Tcomp package for more details.

tourism
autoplot(tourism[[9]])

Sources

Hong, T., Pinson, P., & Fan, S. (2014). Global energy forecasting competition 2012. International Journal of Forecasting, 30(2), 357-363.

Makridakis, S., A. Andersen, R. Carbone, R. Fildes, M. Hibon, R. Lewandowski, J. Newton, E. Parzen, and R. Winkler (1982) The accuracy of extrapolation (time series) methods: results of a forecasting competition. Journal of Forecasting, 1, 111--153.

Makridakis and Hibon (2000) The M3-competition: results, conclusions and implications. International Journal of Forecasting, 16, 451-476.

George Athanasopoulos, Rob J. Hyndman, Haiyan Song, Doris C. Wu, The tourism forecasting competition, International Journal of Forecasting, Volume 27, Issue 3, 2011, Pages 822-844, ISSN 0169-2070.

License

This package is free and open source software, licensed under GPL-3.



robjhyndman/tscompdata documentation built on July 22, 2023, 5:45 p.m.