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_player_box(
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 byDBI::dbConnect()
- tablename
The name of the player box data table within the database
Examples
# \donttest{
try(load_wnba_player_box())
#> ──────────────────────────────────────────────────────────────── wehoop 2.0.0 ──
#> # A tibble: 5,796 × 57
#> game_id season season_type game_date game_date_time athlete_id
#> <int> <int> <int> <date> <dttm> <int>
#> 1 401578574 2023 3 2023-10-18 2023-10-18 20:00:00 924
#> 2 401578574 2023 3 2023-10-18 2023-10-18 20:00:00 3149391
#> 3 401578574 2023 3 2023-10-18 2023-10-18 20:00:00 3888043
#> 4 401578574 2023 3 2023-10-18 2023-10-18 20:00:00 3065570
#> 5 401578574 2023 3 2023-10-18 2023-10-18 20:00:00 4065870
#> 6 401578574 2023 3 2023-10-18 2023-10-18 20:00:00 1004
#> 7 401578574 2023 3 2023-10-18 2023-10-18 20:00:00 1049
#> 8 401578574 2023 3 2023-10-18 2023-10-18 20:00:00 4433633
#> 9 401578574 2023 3 2023-10-18 2023-10-18 20:00:00 812
#> 10 401578574 2023 3 2023-10-18 2023-10-18 20:00:00 2590093
#> # ℹ 5,786 more rows
#> # ℹ 51 more variables: athlete_display_name <chr>, team_id <int>,
#> # team_name <chr>, team_location <chr>, team_short_display_name <chr>,
#> # minutes <dbl>, field_goals_made <int>, field_goals_attempted <int>,
#> # three_point_field_goals_made <int>,
#> # three_point_field_goals_attempted <int>, free_throws_made <int>,
#> # free_throws_attempted <int>, offensive_rebounds <int>, …
# }