Skip to contents

Loads per-game rosters scraped from the WNBA Stats API (boxscoretraditionalv3-style outputs). One row per athlete-team-game triple with jersey, position, starter flag, and DNP status. Backed by the wehoop-wnba-stats-data pipeline that reads raw JSONs from wehoop-wnba-stats-raw and publishes parquet/rds artifacts to the wnba_stats_game_rosters release tag.

load_wnba_stats_game_rosters_manifest() returns the per-season manifest CSV (season, row_count, generated_at_utc, source_endpoint) for the WNBA Stats game rosters release tag without downloading any season's full data.

Usage

load_wnba_stats_game_rosters(
  seasons = most_recent_wnba_stats_season(),
  ...,
  dbConnection = NULL,
  tablename = NULL
)

load_wnba_stats_game_rosters_manifest()

Arguments

seasons

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

...

Additional arguments passed to an underlying function that writes the season data into a database.

dbConnection

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

tablename

The name of the game rosters data table within the database

Value

Returns a wehoop_data tibble with one row per athlete-team-game.

col_nametypesdescription
seasonintegerSeason identifier (4-digit year or 'YYYY-YY' string).
game_idcharacterUnique game identifier.
team_idcharacterUnique team identifier.
team_citycharacterTeam city or region (e.g. 'Las Vegas').
team_namecharacterFull team display name (e.g. 'Las Vegas Aces').
team_tricodecharacterThree-letter team code (e.g. 'LAS' / 'NYL').
athlete_idcharacterUnique athlete identifier (ESPN).
first_namecharacterPlayer's first name.
family_namecharacterPlayer's family / last name.
name_icharacterInitialed name (e.g. 'A. Wilson').
player_slugcharacterURL-safe player identifier.
jersey_numcharacterJersey number worn by the player.
positioncharacterListed roster position (G, F, C, etc.).
starterlogicalTRUE if the player was in the starting lineup; FALSE otherwise.
did_not_playlogicalTRUE if the player did not appear in the game.
statuscharacterStatus label.
commentcharacterPlayer status / inactive reason (e.g. 'DNP - Coach's Decision', 'Inactive').

Examples

# \donttest{
  try(load_wnba_stats_game_rosters(seasons = most_recent_wnba_stats_season()))
#> ──────────────────────────────────────────────────────────────── wehoop 3.0.0 ──
#> # A tibble: 299 × 10
#>    player_id first_name last_name        jersey_num team_id  team_city team_name
#>    <chr>     <chr>      <chr>            <chr>      <chr>    <chr>     <chr>    
#>  1 1630446   Michaela   Onyenwere        "12  "     1611661… Washingt… Mystics  
#>  2 1643430   Cotie      McMahon          "23  "     1611661… Washingt… Mystics  
#>  3 1643440   Darianna   Littlepage-Buggs "5   "     1611661… Washingt… Mystics  
#>  4 1643644   Alicia     Florez Getino    "2   "     1611661… Washingt… Mystics  
#>  5 204330    Isabelle   Harrison         "21  "     1611661… Toronto   Tempo    
#>  6 1630469   Marine     Fauthoux         "4   "     1611661… New York  Liberty  
#>  7 1630389   Dana       Evans            "11  "     1611661… Las Vegas Aces     
#>  8 1643434   Janiah     Barker           "2   "     1611661… Las Vegas Aces     
#>  9 1643438   Marta      Suarez           "77  "     1611661… Phoenix   Mercury  
#> 10 1643470   Shay       Ciezki           "5   "     1611661… Phoenix   Mercury  
#> # ℹ 289 more rows
#> # ℹ 3 more variables: team_abbreviation <chr>, game_id <chr>, season <int>
# }