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 1.8.0 ──
#> # A tibble: 4,559 × 35
#> athlete…¹ team_…² min fg fg3 ft oreb dreb reb ast stl blk
#> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 A'ja Wil… Aces 40 4-13 0-1 3-6 2 12 14 1 2 2
#> 2 Kiah Sto… Aces 27 1-1 0-0 0-0 1 4 5 0 1 0
#> 3 Chelsea … Aces 37 9-13 2-3 0-0 0 5 5 6 1 1
#> 4 Kelsey P… Aces 33 5-12 3-7 2-2 0 1 1 3 3 0
#> 5 Jackie Y… Aces 37 4-14 0-6 5-6 1 4 5 8 2 0
#> 6 Dearica … Aces 3 0-0 0-0 0-0 0 0 0 0 0 0
#> 7 Riquna W… Aces 22 6-11 5-9 0-0 0 2 2 0 2 0
#> 8 DeWanna … Sun 36 4-11 1-3 3-3 0 8 8 2 1 0
#> 9 Alyssa T… Sun 40 5-9 0-0 1-2 4 6 10 11 2 2
#> 10 Jonquel … Sun 29 5-8 2-2 1-1 3 5 8 0 1 2
#> # … with 4,549 more rows, 23 more variables: to <chr>, pf <chr>,
#> # plus_minus <chr>, pts <chr>, starter <lgl>, ejected <lgl>,
#> # did_not_play <lgl>, active <lgl>, athlete_jersey <chr>, athlete_id <chr>,
#> # athlete_short_name <chr>, athlete_headshot_href <chr>,
#> # athlete_position_name <chr>, athlete_position_abbreviation <chr>,
#> # team_name <chr>, team_logo <chr>, team_id <chr>, team_abbreviation <chr>,
#> # team_color <chr>, game_id <int>, season <int>, season_type <int>, …
# }