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

Arguments

seasons

A vector of 4-digit years associated with given WNBA seasons. (Min: 2003)

...

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 team box data table within the database

Value

Returns a tibble

Examples

# \donttest{
  try(load_wnba_team_box())
#> ──────────────────────────────────────────────────────────────── wehoop 1.5.0 ──
#> # A tibble: 102 × 40
#>    team_short_display_name team_uid team_alternate_… team_color team_display_na…
#>    <chr>                   <chr>    <chr>            <chr>      <chr>           
#>  1 Fever                   s:40~l:… 08265b           e2382f     Indiana Fever   
#>  2 Mystics                 s:40~l:… 09295a           e03a3e     Washington Myst…
#>  3 Sparks                  s:40~l:… 49ac9c           532481     Los Angeles Spa…
#>  4 Sky                     s:40~l:… f1f2f3           4f91cd     Chicago Sky     
#>  5 Aces                    s:40~l:… c7cfd4           000000     Las Vegas Aces  
#>  6 Mercury                 s:40~l:… e56020           3a267d     Phoenix Mercury 
#>  7 Lynx                    s:40~l:… 47a757           005084     Minnesota Lynx  
#>  8 Storm                   s:40~l:… f7c43c           05452a     Seattle Storm   
#>  9 Sun                     s:40~l:… 002d62           de6b36     Connecticut Sun 
#> 10 Liberty                 s:40~l:… 89c9bf           0d79b9     New York Liberty
#> # … with 92 more rows, and 35 more variables: team_name <chr>, team_logo <chr>,
#> #   team_location <chr>, team_id <chr>, team_abbreviation <chr>,
#> #   team_slug <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>, …
# }