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.0.0 ──
#> # A tibble: 1,994 × 53
#>      game_id season season_type game_date  game_date_time      team_id team_uid 
#>        <int>  <int>       <int> <date>     <dttm>                <int> <chr>    
#>  1 401604382   2024           2 2023-11-24 2023-11-24 23:59:00    2057 s:40~l:5…
#>  2 401604382   2024           2 2023-11-24 2023-11-24 23:59:00      77 s:40~l:5…
#>  3 401604381   2024           2 2023-11-24 2023-11-24 21:30:00      24 s:40~l:5…
#>  4 401604381   2024           2 2023-11-24 2023-11-24 21:30:00      52 s:40~l:5…
#>  5 401582406   2024           2 2023-11-24 2023-11-24 21:30:00    2771 s:40~l:5…
#>  6 401582406   2024           2 2023-11-24 2023-11-24 21:30:00     254 s:40~l:5…
#>  7 401594834   2024           2 2023-11-24 2023-11-24 21:30:00    2448 s:40~l:5…
#>  8 401594834   2024           2 2023-11-24 2023-11-24 21:30:00    2608 s:40~l:5…
#>  9 401584554   2024           2 2023-11-24 2023-11-24 21:30:00    2641 s:40~l:5…
#> 10 401584554   2024           2 2023-11-24 2023-11-24 21:30:00     164 s:40~l:5…
#> # ℹ 1,984 more rows
#> # ℹ 46 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>, field_goal_pct <dbl>, field_goals_made <int>, …
# }