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_team_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_team_box())
#> ──────────────────────────────────────────────────────────────── wehoop 2.1.0 ──
#> # A tibble: 11,796 × 56
#>      game_id season season_type game_date  game_date_time      team_id team_uid 
#>        <int>  <int>       <int> <date>     <dttm>                <int> <chr>    
#>  1 401637613   2024           3 2024-04-07 2024-04-07 15:00:00    2294 s:40~l:5…
#>  2 401637613   2024           3 2024-04-07 2024-04-07 15:00:00    2579 s:40~l:5…
#>  3 401641587   2024           3 2024-04-06 2024-04-06 15:00:00     135 s:40~l:5…
#>  4 401641587   2024           3 2024-04-06 2024-04-06 15:00:00     139 s:40~l:5…
#>  5 401637612   2024           3 2024-04-05 2024-04-05 21:32:00      41 s:40~l:5…
#>  6 401637612   2024           3 2024-04-05 2024-04-05 21:32:00    2294 s:40~l:5…
#>  7 401637611   2024           3 2024-04-05 2024-04-05 19:00:00     152 s:40~l:5…
#>  8 401637611   2024           3 2024-04-05 2024-04-05 19:00:00    2579 s:40~l:5…
#>  9 401641629   2024           3 2024-04-03 2024-04-03 19:00:00     356 s:40~l:5…
#> 10 401641629   2024           3 2024-04-03 2024-04-03 19:00:00     222 s:40~l:5…
#> # ℹ 11,786 more rows
#> # ℹ 49 more variables: team_slug <chr>, team_location <chr>, team_name <chr>,
#> #   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>, fast_break_points <chr>, field_goal_pct <dbl>, …
# }