helper that loads multiple seasons from the data repo either into memory or writes it into a db using some forwarded arguments in the dots

load_nhl_schedule(
  seasons = most_recent_nhl_season(),
  ...,
  dbConnection = NULL,
  tablename = NULL
)

Arguments

seasons

A vector of 4-digit years associated with given NHL seasons. (Min: 2002)

...

Additional arguments passed to an underlying function that writes the season data into a database (used by update_nhl_db()).

dbConnection

A DBIConnection object, as returned by DBI::dbConnect()

tablename

The name of the schedule data table within the database

Value

Returns a tibble

Examples

# \donttest{
load_nhl_schedule(2021)
#> # A tibble: 952 × 23
#>    game_id   link      game_type_abbrev… season_full game_date status_abstract_…
#>    <list>    <list>    <list>            <list>      <list>    <list>           
#>  1 <int [1]> <chr [1]> <chr [1]>         <chr [1]>   <chr [1]> <chr [1]>        
#>  2 <int [1]> <chr [1]> <chr [1]>         <chr [1]>   <chr [1]> <chr [1]>        
#>  3 <int [1]> <chr [1]> <chr [1]>         <chr [1]>   <chr [1]> <chr [1]>        
#>  4 <int [1]> <chr [1]> <chr [1]>         <chr [1]>   <chr [1]> <chr [1]>        
#>  5 <int [1]> <chr [1]> <chr [1]>         <chr [1]>   <chr [1]> <chr [1]>        
#>  6 <int [1]> <chr [1]> <chr [1]>         <chr [1]>   <chr [1]> <chr [1]>        
#>  7 <int [1]> <chr [1]> <chr [1]>         <chr [1]>   <chr [1]> <chr [1]>        
#>  8 <int [1]> <chr [1]> <chr [1]>         <chr [1]>   <chr [1]> <chr [1]>        
#>  9 <int [1]> <chr [1]> <chr [1]>         <chr [1]>   <chr [1]> <chr [1]>        
#> 10 <int [1]> <chr [1]> <chr [1]>         <chr [1]>   <chr [1]> <chr [1]>        
#> # … with 942 more rows, and 17 more variables: status_coded_game_state <list>,
#> #   status_detailed_state <list>, status_status_code <list>,
#> #   status_start_time_tbd <list>, away_score <list>, away_team_id <list>,
#> #   away_team_name <list>, away_team_link <list>, home_score <list>,
#> #   home_team_id <list>, home_team_name <list>, home_team_link <list>,
#> #   venue_name <list>, venue_link <list>, venue_id <list>, content_link <list>,
#> #   game_type <chr>
# }