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 byDBI::dbConnect()
- tablename
The name of the team box data table within the database
Examples
# \donttest{
try(load_wnba_team_box())
#> ──────────────────────────────────────────────────────────────── wehoop 1.8.0 ──
#> # A tibble: 482 × 52
#> game_id season season_…¹ game_date team_id team_…² team_…³ team_…⁴ team_…⁵
#> <int> <int> <int> <date> <int> <chr> <chr> <chr> <chr>
#> 1 401455684 2022 3 2022-09-18 17 s:40~l… las-ve… Las Ve… Aces
#> 2 401455684 2022 3 2022-09-18 18 s:40~l… connec… Connec… Sun
#> 3 401455683 2022 3 2022-09-16 17 s:40~l… las-ve… Las Ve… Aces
#> 4 401455683 2022 3 2022-09-16 18 s:40~l… connec… Connec… Sun
#> 5 401455682 2022 3 2022-09-14 18 s:40~l… connec… Connec… Sun
#> 6 401455682 2022 3 2022-09-14 17 s:40~l… las-ve… Las Ve… Aces
#> 7 401455681 2022 3 2022-09-11 18 s:40~l… connec… Connec… Sun
#> 8 401455681 2022 3 2022-09-11 17 s:40~l… las-ve… Las Ve… Aces
#> 9 401455679 2022 3 2022-09-09 18 s:40~l… connec… Connec… Sun
#> 10 401455679 2022 3 2022-09-09 19 s:40~l… chicag… Chicago Sky
#> # … with 472 more rows, 43 more variables: 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>, field_goal_pct <dbl>, field_goals_made <int>,
#> # field_goals_attempted <int>, flagrant_fouls <int>, fouls <int>,
#> # free_throw_pct <dbl>, free_throws_made <int>, …
# }