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_team_box(
  seasons = most_recent_wnba_season(),
  ...,
  dbConnection = NULL,
  tablename = NULL
)

Arguments

seasons

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

...

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 team box data table within the database

Value

Returns a tibble

Examples

# \donttest{
  try(load_wnba_team_box())
#> ──────────────────────────────────────────────────────────────── wehoop 3.0.0 ──
#> # A tibble: 188 × 59
#>      game_id season season_type game_date  game_date_time      team_id team_uid 
#>        <int>  <int>       <int> <date>     <dttm>                <int> <chr>    
#>  1 401856983   2026           2 2026-06-11 2026-06-11 22:00:00      17 s:40~l:5…
#>  2 401856983   2026           2 2026-06-11 2026-06-11 22:00:00  132052 s:40~l:5…
#>  3 401856982   2026           2 2026-06-11 2026-06-11 21:00:00      11 s:40~l:5…
#>  4 401856982   2026           2 2026-06-11 2026-06-11 21:00:00       3 s:40~l:5…
#>  5 401856981   2026           2 2026-06-11 2026-06-11 19:30:00       9 s:40~l:5…
#>  6 401856981   2026           2 2026-06-11 2026-06-11 19:30:00      20 s:40~l:5…
#>  7 401856980   2026           2 2026-06-11 2026-06-11 19:00:00      19 s:40~l:5…
#>  8 401856980   2026           2 2026-06-11 2026-06-11 19:00:00       5 s:40~l:5…
#>  9 401856979   2026           2 2026-06-10 2026-06-10 22:00:00       6 s:40~l:5…
#> 10 401856979   2026           2 2026-06-10 2026-06-10 22:00:00      14 s:40~l:5…
#> # ℹ 178 more rows
#> # ℹ 52 more variables: team_slug <chr>, team_location <chr>, team_name <chr>,
#> #   team_abbreviation <chr>, team_display_name <chr>,
#> #   team_short_display_name <chr>, team_color <chr>,
#> #   team_alternate_color <chr>, team_logo <chr>, team_home_away <chr>,
#> #   team_score <int>, team_winner <lgl>, assists <int>, blocks <int>,
#> #   defensive_rebounds <int>, fast_break_points <chr>, field_goal_pct <dbl>, …
# }