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 1.7.0 ──
#> # A tibble: 1,580 × 41
#>    team_id team_uid      team_…¹ team_…² team_…³ team_…⁴ team_…⁵ team_…⁶ team_…⁷
#>    <chr>   <chr>         <chr>   <chr>   <chr>   <chr>   <chr>   <chr>   <chr>  
#>  1 2501    s:40~l:54~t:… portla… Portla… Pilots  PORT    Portla… Portla… 0e034e 
#>  2 28      s:40~l:54~t:… uc-san… UC San… Tritons UCSD    UC San… UC San… 000000 
#>  3 304     s:40~l:54~t:… idaho-… Idaho … Bengals IDST    Idaho … Idaho … ef8c00 
#>  4 264     s:40~l:54~t:… washin… Washin… Huskies WASH    Washin… Washin… 2B2F64 
#>  5 97      s:40~l:54~t:… louisv… Louisv… Cardin… LOU     Louisv… Louisv… ad000a 
#>  6 251     s:40~l:54~t:… texas-… Texas   Longho… TEX     Texas … Texas   EE7524 
#>  7 288     s:40~l:54~t:… lipsco… Lipsco… Bisons  LIP     Lipsco… Lipsco… 20366C 
#>  8 62      s:40~l:54~t:… hawaii… Hawai'i Rainbo… HAW     Hawai'… Hawai'i 003420 
#>  9 2534    s:40~l:54~t:… sam-ho… Sam Ho… Bearka… SHSU    Sam Ho… Sam Ho… fe5000 
#> 10 2655    s:40~l:54~t:… tulane… Tulane  Green … TULN    Tulane… Tulane  005837 
#> # … with 1,570 more rows, 32 more variables: team_alternate_color <chr>,
#> #   team_logo <chr>, field_goals_made_field_goals_attempted <chr>,
#> #   field_goal_pct <chr>,
#> #   three_point_field_goals_made_three_point_field_goals_attempted <chr>,
#> #   three_point_field_goal_pct <chr>,
#> #   free_throws_made_free_throws_attempted <chr>, free_throw_pct <chr>,
#> #   total_rebounds <chr>, offensive_rebounds <chr>, defensive_rebounds <chr>, …
# }