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_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 by DBI::dbConnect()

tablename

The name of the player box data table within the database

Value

Returns a tibble

Examples

# \donttest{
  try(load_wnba_player_box())
#> ──────────────────────────────────────────────────────────────── wehoop 1.7.0 ──
#> # A tibble: 4,450 × 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 Candace … Sky     26    3-9   2-5   3-3   0     9     9     4     0     0    
#>  2 Emma Mee… Sky     32    7-11  0-1   0-0   0     2     2     6     2     0    
#>  3 Allie Qu… Sky     19    3-6   3-5   1-2   0     0     0     2     0     0    
#>  4 Courtney… Sky     17    5-7   0-1   0-0   0     2     2     3     0     0    
#>  5 Kahleah … Sky     33    5-10  0-3   6-7   0     2     2     0     0     0    
#>  6 Azura St… Sky     17    0-3   0-1   0-0   0     1     1     1     0     1    
#>  7 Ruthy He… Sky     5     0-2   0-0   0-0   0     0     0     1     0     0    
#>  8 Rebekah … Sky     23    1-8   0-2   1-2   3     2     5     4     3     1    
#>  9 Julie Al… Sky     18    2-2   1-1   1-2   0     0     0     2     2     1    
#> 10 Dana Eva… Sky     10    4-5   2-2   0-0   0     2     2     0     1     0    
#> # … with 4,440 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>, …
# }