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 2.1.0 ──
#> # A tibble: 300 × 57
#>      game_id season season_type game_date  game_date_time      team_id team_uid 
#>        <int>  <int>       <int> <date>     <dttm>                <int> <chr>    
#>  1 401620458   2024           2 2024-07-20 2024-07-20 20:30:00      97 s:40~l:5…
#>  2 401620458   2024           2 2024-07-20 2024-07-20 20:30:00      96 s:40~l:5…
#>  3 401620365   2024           2 2024-07-17 2024-07-17 19:30:00       5 s:40~l:5…
#>  4 401620365   2024           2 2024-07-17 2024-07-17 19:30:00       3 s:40~l:5…
#>  5 401620364   2024           2 2024-07-17 2024-07-17 13:00:00      20 s:40~l:5…
#>  6 401620364   2024           2 2024-07-17 2024-07-17 13:00:00       8 s:40~l:5…
#>  7 401620363   2024           2 2024-07-16 2024-07-16 22:00:00      19 s:40~l:5…
#>  8 401620363   2024           2 2024-07-16 2024-07-16 22:00:00      17 s:40~l:5…
#>  9 401620362   2024           2 2024-07-16 2024-07-16 19:00:00      18 s:40~l:5…
#> 10 401620362   2024           2 2024-07-16 2024-07-16 19:00:00       9 s:40~l:5…
#> # ℹ 290 more rows
#> # ℹ 50 more variables: team_slug <chr>, team_location <chr>, team_name <chr>,
#> #   team_abbreviation <chr>, team_display_name <chr>,
#> #   team_short_display_name <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>,
#> #   field_goals_made <int>, field_goals_attempted <int>, …
# }