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_wbb_player_box(
  seasons = most_recent_wbb_season(),
  ...,
  dbConnection = NULL,
  tablename = NULL
)

Arguments

seasons

A vector of 4-digit years associated with given women's college basketball seasons. (Min: 2006)

...

Additional arguments passed to an underlying function that writes the season data into a database (used by update_wbb_db()).

dbConnection

A DBIConnection object, as returned by DBI::dbConnect()

tablename

The name of the play by play data table within the database

Value

Returns a tibble

Examples

# \donttest{
  try(load_wbb_player_box())
#> ──────────────────────────────────────────────────────────────── wehoop 1.7.0 ──
#> # A tibble: 16,942 × 34
#>    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 Lucy Coc… Portla… 23    3-7   0-0   0-0   1     4     5     1     0     2    
#>  2 Alex Fow… Portla… 30    2-5   0-1   12-16 2     2     4     3     1     0    
#>  3 Keeley F… Portla… 20    0-2   0-2   0-0   4     3     7     0     0     0    
#>  4 Maisie B… Portla… 17    2-5   1-1   3-3   1     1     2     0     2     0    
#>  5 Kelsey L… Portla… 17    4-10  3-8   0-0   0     1     1     0     0     0    
#>  6 Emily Se… Portla… 5     1-2   0-0   0-0   0     0     0     0     0     0    
#>  7 Liana Ka… Portla… 18    1-6   0-2   2-7   1     2     3     1     2     1    
#>  8 Melika S… Portla… 2     0-1   0-1   0-0   0     0     0     1     0     0    
#>  9 MJ Bruno  Portla… 22    4-5   3-3   0-0   2     2     4     2     1     0    
#> 10 Emme She… Portla… 24    3-7   1-3   0-0   2     6     8     2     1     0    
#> # … with 16,932 more rows, 22 more variables: to <chr>, pf <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>, game_date <date>, and abbreviated …
# }