Skip to contents

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

Usage

load_wnba_schedule(
  seasons = most_recent_wnba_season(),
  ...,
  dbConnection = NULL,
  tablename = NULL
)

Arguments

seasons

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

...

Additional arguments passed to an underlying function that writes the season data into a database (used by update_wnba_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{
  try(load_wnba_schedule())
#> ──────────────────────────────────────────────────────────────── wehoop 1.5.0 ──
#> # A tibble: 217 × 58
#>    id       uid   date  attendance timeValid neutralSite conferenceCompe… recent
#>    <chr>    <chr> <chr>      <dbl> <lgl>     <lgl>       <lgl>            <lgl> 
#>  1 4013916… s:40… 2022…       4200 TRUE      FALSE       FALSE            FALSE 
#>  2 4013916… s:40… 2022…       8111 TRUE      FALSE       FALSE            FALSE 
#>  3 4013916… s:40… 2022…          0 TRUE      FALSE       FALSE            FALSE 
#>  4 4013916… s:40… 2022…      12904 TRUE      FALSE       FALSE            FALSE 
#>  5 4013916… s:40… 2022…       6829 TRUE      FALSE       FALSE            FALSE 
#>  6 4013916… s:40… 2022…       5796 TRUE      FALSE       FALSE            FALSE 
#>  7 4013916… s:40… 2022…       2545 TRUE      FALSE       FALSE            FALSE 
#>  8 4013916… s:40… 2022…       8134 TRUE      FALSE       FALSE            FALSE 
#>  9 4013916… s:40… 2022…       6212 TRUE      FALSE       FALSE            FALSE 
#> 10 4013916… s:40… 2022…       3082 TRUE      FALSE       FALSE            FALSE 
#> # … with 207 more rows, and 50 more variables: notes <chr>, startDate <chr>,
#> #   type.id <chr>, type.abbreviation <chr>, venue.id <chr>,
#> #   venue.fullName <chr>, venue.address.city <chr>, venue.address.state <chr>,
#> #   venue.capacity <dbl>, venue.indoor <lgl>, status.clock <dbl>,
#> #   status.displayClock <chr>, status.period <dbl>, status.type.id <chr>,
#> #   status.type.name <chr>, status.type.state <chr>,
#> #   status.type.completed <lgl>, status.type.description <chr>, …
# }