Package 'tsibbledata'

Title: Diverse Datasets for 'tsibble'
Description: Provides diverse datasets in the 'tsibble' data structure. These datasets are useful for learning and demonstrating how tidy temporal data can tidied, visualised, and forecasted.
Authors: Mitchell O'Hara-Wild [aut, cre], Rob Hyndman [aut], Earo Wang [aut], Rakshitha Godahewa [aut], Christoph Bergmeir [ctb]
Maintainer: Mitchell O'Hara-Wild <[email protected]>
License: GPL-3
Version: 0.4.1.9000
Built: 2024-11-11 04:18:49 UTC
Source: https://github.com/tidyverts/tsibbledata

Help Index


Passenger numbers on Ansett airline flights

Description

The data features a major pilots' industrial dispute which results in some weeks having zero passengers. There were also at least two changes in the definitions of passenger classes.

Format

Time series of class tsibble

Details

ansett is a weekly tsibble with one value:

Passengers: Total air passengers travelling with Ansett

Each series is uniquely identified using two keys:

Airports: The airports that passengers are travelling between (both directions)
Class: The class of the ticket.

Source

Ansett Airlines (which no longer exists).

Examples

library(tsibble)
ansett

Australian livestock slaughter

Description

Meat production in Australia for human consumption

Format

Time series of class tsibble

Details

aus_livestock is a monthly tsibble with one value:

Count: Number of animals slaughtered.

Each series is uniquely identified using two keys:

Animal: The animal slaughtered.
State: The Australian state (or territory).

Source

Australian Bureau of Statistics, catalogue number 7218.0.55.001 tables 1 to 7.

Examples

library(tsibble)
aus_livestock

Quarterly production of selected commodities in Australia.

Description

Quarterly estimates of selected indicators of manufacturing production in Australia.

Format

Time series of class tsibble.

Details

aus_production is a half-hourly tsibble with six values:

Beer: Beer production in megalitres.
Tobacco: Tobacco and cigarette production in tonnes.
Bricks: Clay brick production in millions of bricks.
Cement: Portland cement production in thousands of tonnes.
Electricity: Electricity production in gigawatt hours.
Gas: Gas production in petajoules.

Source

Australian Bureau of Statistics, catalogue number 8301.0.55.001 table 1.

Examples

library(tsibble)
aus_production

Australian retail trade turnover

Description

aus_retail is a monthly tsibble with one value:

Turnover: Retail turnover in $Million AUD

Format

Time series of class tsibble

Details

Each series is uniquely identified using two keys:

State: The Australian state (or territory)
Industry: The industry of retail trade

Source

Australian Bureau of Statistics, catalogue number 8501.0, table 11.

Examples

library(tsibble)
aus_retail

GAFA stock prices

Description

Historical stock prices from 2014-2018 for Google, Amazon, Facebook and Apple. All prices are in $USD.

Format

Time series of class tsibble

Details

gafa_stock is a tsibble containing data on irregular trading days:

Open: The opening price for the stock.
High: The stock's highest trading price.
Low: The stock's lowest trading price.
Close: The closing price for the stock.
Adj_Close: The adjusted closing price for the stock.
Volume: The amount of stock traded.

Each stock is uniquely identified by one key:

Symbol: The ticker symbol for the stock.

Source

Yahoo Finance historical data

Examples

library(tsibble)
gafa_stock

Global economic indicators

Description

Economic indicators featured by the World Bank from 1960 to 2017.

Format

Time series of class tsibble

Details

global_economy is an annual tsibble with six values:

GDP: Gross domestic product (in $USD February 2019).
Growth: Annual percentage growth in GDP.
CPI: Consumer price index (base year 2010).
Imports: Imports of goods and services (% of GDP).
Exports: Exports of goods and services (% of GDP).
Population: Total population.

Each series is uniquely identified by one key:

Country: The country or region of the series.

Source

The World Bank, http://datatopics.worldbank.org/world-development-indicators/

Examples

library(tsibble)
global_economy

Household budget characteristics

Description

Annual indicators of household budgets for Australia, Japan, Canada and USA from 1995-2016.

Format

Time series of class tsibble.

Details

hh_budget is an annual tsibble with six values:

Debt: Debt as a percentage of net disposable income.
DI: Annual growth rate of disposable income.
Expenditure: Annual growth rate of expenditure.
Savings: Savings as a percentage of household disposable income.
Wealth: Wealth as a percentage of net disposable income.
Unemployment: Percentage of unemployed in the labour force.

Each country is uniquely identified by one key:

Country: The country of the series.

Source

The Organisation for Economic Co-operation and Development (https://data.oecd.org/)

Examples

library(tsibble)
hh_budget

Get data from the Monash Forecasting Repository

Description

This function downloads datasets from the Monash Time Series Forecasting Repository (https://forecastingdata.org/) and reads them in as a tsibble. Downloaded data will be stored locally, allowing subsequent use of the data without downloading. By default, the data is stored the appropriate application data directory which varies by your operating system. The storage path for these datasets can be changed by setting the rpkg_tsibbledata option with ⁠options(rpkg_tsibbledata = /path/to/datadir)⁠

Usage

monash_forecasting_repository(record_id)

Arguments

record_id

Record ID of the dataset to be downloaded from the Monash Time Series Forecasting Repository. A complete table of datasets which can be obtained with this function can be found here: https://forecastingdata.org/#datasets. From this link, the data's record_id can be found in the URL of the download link provided in the table (it should look like https://zenodo.org/record/<Record ID>). This can also simply be a link to the zenodo record.

Details

Datasets from this repository are stored in a tsf file format, which stores time series metadata at the top of the file. This function uses this metadata to produce a tsibble dataset, ready for analysis in R. For more details on the repository and the tsf file format, please refer to: Godahewa, R., Bergmeir, C., Webb, G. I., Hyndman, R. J. & Montero-Manso, P. (2021), Monash Time Series Forecasting Archive.

Value

A tsibble.

References

Godahewa, R., Bergmeir, C., Webb, G. I., Hyndman, R. J. & Montero-Manso, P. (2021), Monash Time Series Forecasting Repository. https://forecastingdata.org/

Godahewa, R., Bergmeir, C., Webb, G. I., Hyndman, R. J. & Montero-Manso, P. (2021), Monash Time Series Forecasting Archive.


NYC Citi Bike trips

Description

A sample from NYC Citi Bike usage of 10 bikes throughout 2018. The data includes event data on each trip, including the trip's start and end times and locations. The customer's gender, birth year and bike usage type is also available.

Format

Time series of class tsibble

Details

nyc_bikes is a tsibble containing event data, the events include these details:

start_time: The time and date when the trip was started.
stop_time: The time and date when the trip was ended.
start_station: A unique identifier for the starting bike station.
start_lat: The latitude of the starting bike station.
start_long: The longitude of the starting bike station.
end_station: A unique identifier for the destination bike station.
end_lat: The latitutde of the destination bike station.
end_long: The longitude of the destination bike station.
type: The type of trip. A "Customer" has purchased either a 24-hour or 3-day pass, and a "Subscriber" has purchased an annual subscription.
birth_year The bike rider's year of birth.
gender: The gender of the bike rider.

Each series is uniquely identified by one key:

bike_id: A unique identifier for the bike.

Source

Citi Bike NYC, https://www.citibikenyc.com/system-data

Examples

library(tsibble)
nyc_bikes

Fastest running times for Olympic races

Description

olympic_running is a quadrennial tsibble with one value:

Time: Fastest running time for the event (seconds)

Format

Time series of class tsibble

Details

The event is identified using two keys:

Length: The length of the race (meters)
Sex: The sex of the event

The data contains missing values in 1916, 1940 and 1944 due to the World Wars.

Source

https://olympics.com/en/sports/athletics/

Examples

library(tsibble)
olympic_running

if(requireNamespace("ggplot2")){
library(ggplot2)
olympic_running %>% as_tibble %>%
  ggplot(aes(x=Year, y = Time, colour = Sex)) +
  geom_line() +
  facet_wrap(~ Length, scales = "free_y")
}

Monthly Medicare Australia prescription data

Description

PBS is a monthly tsibble with two values:

Scripts: Total number of scripts
Cost: Cost of the scripts in $AUD

Format

Time series of class tsibble

Details

The data is disaggregated using four keys:

Concession: Concessional scripts are given to pensioners, unemployed, dependents, and other card holders
Type: Co-payments are made until an individual's script expenditure hits a threshold ($290.00 for concession, $1141.80 otherwise). Safety net subsidies are provided to individuals exceeding this amount.
ATC1: Anatomical Therapeutic Chemical index (level 1)
ATC2: Anatomical Therapeutic Chemical index (level 2)

Source

Medicare Australia

Examples

library(tsibble)
PBS

Pelt trading records

Description

Hudson Bay Company trading records for Snowshoe Hare and Canadian Lynx furs from 1845 to 1935. This data contains trade records for all areas of the company.

Format

Time series of class tsibble

Details

pelt is an annual tsibble with two values:

Hare: The number of Snowshoe Hare pelts traded.
Lynx: The number of Canadian Lynx pelts traded.

Source

Hudson Bay Company

Examples

library(tsibble)
pelt

Half-hourly electricity demand for Victoria, Australia

Description

vic_elec is a half-hourly tsibble with three values:

Demand: Total electricity demand in MWh.
Temperature: Temperature of Melbourne (BOM site 086071).
Holiday: Indicator for if that day is a public holiday.

Format

Time series of class tsibble.

Details

This data is for operational demand, which is the demand met by local scheduled generating units, semi-scheduled generating units, and non-scheduled intermittent generating units of aggregate capacity larger than 30 MWh, and by generation imports to the region. The operational demand excludes the demand met by non-scheduled non-intermittent generating units, non-scheduled intermittent generating units of aggregate capacity smaller than 30 MWh, exempt generation (e.g. rooftop solar, gas tri-generation, very small wind farms, etc), and demand of local scheduled loads. It also excludes some very large industrial users (such as mines or smelters).

Source

Australian Energy Market Operator.

Examples

library(tsibble)
vic_elec