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.7.0 ──
#> # A tibble: 241 × 62
#>    id        uid    date  atten…¹ time_…² neutr…³ confe…⁴ recent start…⁵ notes…⁶
#>    <chr>     <chr>  <chr>   <dbl> <lgl>   <lgl>   <lgl>   <lgl>  <chr>   <chr>  
#>  1 401391650 s:40~… 2022…    4200 TRUE    FALSE   FALSE   FALSE  2022-0… "event"
#>  2 401391651 s:40~… 2022…    8111 TRUE    FALSE   FALSE   FALSE  2022-0… ""     
#>  3 401391652 s:40~… 2022…       0 TRUE    FALSE   FALSE   FALSE  2022-0… "event"
#>  4 401391653 s:40~… 2022…   12904 TRUE    FALSE   FALSE   FALSE  2022-0… "event"
#>  5 401391654 s:40~… 2022…    6829 TRUE    FALSE   FALSE   FALSE  2022-0… "event"
#>  6 401391655 s:40~… 2022…    5796 TRUE    FALSE   FALSE   FALSE  2022-0… ""     
#>  7 401391656 s:40~… 2022…    2545 TRUE    FALSE   FALSE   FALSE  2022-0… ""     
#>  8 401391658 s:40~… 2022…    8134 TRUE    FALSE   FALSE   FALSE  2022-0… ""     
#>  9 401391657 s:40~… 2022…    6212 TRUE    FALSE   FALSE   FALSE  2022-0… "event"
#> 10 401391659 s:40~… 2022…    3082 TRUE    FALSE   FALSE   FALSE  2022-0… ""     
#> # … with 231 more rows, 52 more variables: notes_headline <chr>, type_id <chr>,
#> #   type_abbreviation <chr>, venue_id <chr>, venue_full_name <chr>,
#> #   venue_address_city <chr>, venue_address_state <chr>, venue_capacity <dbl>,
#> #   venue_indoor <lgl>, status_clock <dbl>, status_display_clock <chr>,
#> #   status_period <dbl>, status_type_id <chr>, status_type_name <chr>,
#> #   status_type_state <chr>, status_type_completed <lgl>,
#> #   status_type_description <chr>, status_type_detail <chr>, …
# }