# NOT RUN {
# Monthly counts across Sensors
data(pedestrian)
monthly_ped <- pedestrian %>%
group_by(Sensor) %>%
tsummarise(
Year_Month = yearmonth(Date_Time), # Year_Month will be the new index
Max_Count = max(Count),
Min_Count = min(Count)
)
monthly_ped
index(monthly_ped)
# Annual trips by Region and State ----
data(tourism)
tourism %>%
group_by(Region | State) %>%
tsummarise(Year = lubridate::year(Quarter), Total = sum(Trips))
# }
Run the code above in your browser using DataLab