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.5.0 ──
#> # A tibble: 962 × 35
#>    athlete_display_n… team_short_disp… min   fg    fg3   ft    oreb  dreb  reb  
#>    <chr>              <chr>            <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#>  1 NaLyssa Smith      Fever            35    5-13  0-3   3-5   3     10    13   
#>  2 Queen Egbo         Fever            20    5-9   0-0   0-0   1     5     6    
#>  3 Tiffany Mitchell   Fever            18    3-5   1-1   0-0   1     0     1    
#>  4 Kelsey Mitchell    Fever            37    7-16  2-7   2-3   1     2     3    
#>  5 Destanni Henderson Fever            17    2-6   0-1   0-0   1     1     2    
#>  6 Alanna Smith       Fever            9     0-1   0-1   0-0   0     2     2    
#>  7 Emily Engstler     Fever            17    2-5   0-1   0-0   2     7     9    
#>  8 Victoria Vivians   Fever            22    4-11  1-4   0-0   3     3     6    
#>  9 Crystal Dangerfie… Fever            18    2-5   1-3   0-0   0     0     0    
#> 10 Lexie Hull         Fever            8     0-1   0-1   0-0   0     0     0    
#> # … with 952 more rows, and 26 more variables: ast <chr>, stl <chr>, blk <chr>,
#> #   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>, …
# }