The function will query the NHL attendance number from 1975 to 2019 from the NHL records API. The attendance represents annual attendance numbers for all teams. The user can specify to return either the regular season attendance, playoff attendance numbers, or both. The function will display a chart showing the attendance over the specified time period.
attendance( regular = TRUE, playoffs = TRUE, start_season = NULL, end_season = NULL )
regular | boolean: whether to return regular attendance |
---|---|
playoffs | boolean: whether to return playoffs attendance |
start_season | integer: the start season |
end_season | integer: the end season |
a ggplot object
attendance(regular=TRUE, playoffs=TRUE, start_season= 2000, end_season=2018)