Skip to contents

Returns NHL Schedule data

Usage

nhl_schedule(season = NULL, day = as.Date(Sys.Date(), "%Y-%m-%d"))

Arguments

season

NHL Season

day

Date

Value

Returns a tibble

Examples

# \donttest{
  try(nhl_schedule(season = 2023))
#> # A tibble: 1,312 × 24
#>    game_id link  game_…¹ seaso…² game_…³ statu…⁴ statu…⁵ statu…⁶ statu…⁷ statu…⁸
#>      <int> <chr> <chr>   <chr>   <chr>   <chr>   <chr>   <chr>   <chr>   <lgl>  
#>  1  2.02e9 /api… R       202220… 2022-1… Final   7       Final   7       FALSE  
#>  2  2.02e9 /api… R       202220… 2022-1… Final   7       Final   7       FALSE  
#>  3  2.02e9 /api… R       202220… 2022-1… Final   7       Final   7       FALSE  
#>  4  2.02e9 /api… R       202220… 2022-1… Final   7       Final   7       FALSE  
#>  5  2.02e9 /api… R       202220… 2022-1… Final   7       Final   7       FALSE  
#>  6  2.02e9 /api… R       202220… 2022-1… Final   7       Final   7       FALSE  
#>  7  2.02e9 /api… R       202220… 2022-1… Final   7       Final   7       FALSE  
#>  8  2.02e9 /api… R       202220… 2022-1… Final   7       Final   7       FALSE  
#>  9  2.02e9 /api… R       202220… 2022-1… Final   7       Final   7       FALSE  
#> 10  2.02e9 /api… R       202220… 2022-1… Final   7       Final   7       FALSE  
#> # … with 1,302 more rows, 14 more variables: away_score <int>,
#> #   away_team_id <int>, away_team_name <chr>, away_team_link <chr>,
#> #   home_score <int>, home_team_id <int>, home_team_name <chr>,
#> #   home_team_link <chr>, venue_name <chr>, venue_link <chr>, venue_id <int>,
#> #   content_link <chr>, game_type <chr>, game_date <date>, and abbreviated
#> #   variable names ¹​game_type_abbreviation, ²​season_full, ³​game_date_time,
#> #   ⁴​status_abstract_game_state, ⁵​status_coded_game_state, …
# }