A dataset containing the quarterly overnight trips from 1998 Q1 to 2016 Q4 across Australia.
tourism
A tsibble with 23,408 rows and 5 variables:
Quarter: Year quarter (index)
Region: The tourism regions are formed through the aggregation of Statistical Local Areas (SLAs) which are defined by the various State and Territory tourism authorities according to their research and marketing needs
State: States and territories of Australia
Purpose: Stopover purpose of visit:
"Holiday"
"Visiting friends and relatives"
"Business"
"Other reason"
Trips: Overnight trips in thousands
This data gives an example of nested and crossed time series
structure. Region and State together form a geographical hierarchy.
In other words, Region is nested into State. These two geographical
variables are crossed with Purpose of visit. The resulting structure is
Region
| State
, Purpose
.
# NOT RUN {
data(tourism)
# nesting and crossed structure
key(tourism)
# Total trips over geographical regions
tourism %>%
group_by(Region, State) %>%
summarise(Total_Trips = sum(Trips))
# }
Run the code above in your browser using DataLab