Skip to contents

[Deprecated] Loads season-level WNBA player statistics. Deprecated: the wnba_stats_player_season_stats release tag (R-scraped, Base/Advanced/Misc/Scoring/Usage/ Defense measures) is superseded by the wnba_stats_leaguedash tag (Python-scraped parameter cube, same 6 measure types plus player_bio and a wide player_master mega). This function reshapes the cube back into the old stacked-by-measure_type contract for compatibility; call the cube's player_stats_* / player_master assets directly with load_wnba_stats_leaguedash() for the full surface.

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

Usage

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

load_wnba_stats_player_stats_manifest()

Arguments

seasons

A vector of 4-digit years associated with given WNBA seasons. Published coverage runs 1997 through the most recent season, with no gaps. Pass seasons = TRUE for every published season. (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 player season stats table within the database

Value

Returns a wehoop_data tibble of player season stats.

Examples

# \donttest{
  try(load_wnba_stats_player_stats(seasons = most_recent_wnba_stats_season()))
#> Warning: `load_wnba_stats_player_stats()` was deprecated in wehoop 3.0.0.
#>  Backing data moved from the wnba_stats_player_season_stats release tag to the
#>   wnba_stats_leaguedash release tag (a Python-scraped parameter cube). This
#>   call reshapes the cube's
#>   player_stats_{base,advanced,misc,scoring,usage,defense} assets back into the
#>   old stacked-by-measure_type contract.
#> ──────────────────────────────────────────────────────────────── wehoop 3.0.0 ──
#> # A tibble: 1,356 × 211
#>    player_id player_name    nickname team_id team_abbreviation   age    gp     w
#>        <int> <chr>          <chr>      <int> <chr>             <dbl> <int> <int>
#>  1   1628932 A'ja Wilson    A'ja      1.61e9 LVA                  30    31    22
#>  2   1642290 Aaliyah Edwar… Aaliyah   1.61e9 CON                  24    21     7
#>  3   1642801 Aaliyah Nye    Aaliyah   1.61e9 ATL                  23    15     9
#>  4   1642786 Aicha Couliba… Aicha     1.61e9 CHI                  24    23     8
#>  5   1629501 Alanna Smith   Alanna    1.61e9 DAL                  29    26    16
#>  6   1643525 Alex Fowler    Alex      1.61e9 NYL                  25     2     1
#>  7   1642775 Alex Wilson    Alex      1.61e9 WAS                  32     4     2
#>  8   1643644 Alicia Florez  Alicia    1.61e9 WAS                  22    23    14
#>  9   1642293 Alissa Pili    Alissa    1.61e9 LAS                  25     3     2
#> 10   1641648 Aliyah Boston  Aliyah    1.61e9 IND                  24    30    19
#> # ℹ 1,346 more rows
#> # ℹ 203 more variables: l <int>, w_pct <dbl>, min <dbl>, fgm <int>, fga <int>,
#> #   fg_pct <dbl>, fg3_m <int>, fg3_a <int>, fg3_pct <dbl>, ftm <int>,
#> #   fta <int>, ft_pct <dbl>, oreb <int>, dreb <int>, reb <int>, ast <int>,
#> #   tov <int>, stl <int>, blk <int>, blka <int>, pf <int>, pfd <int>,
#> #   pts <int>, plus_minus <int>, nba_fantasy_pts <dbl>, dd2 <int>, td3 <int>,
#> #   wnba_fantasy_pts <dbl>, gp_rank <int>, w_rank <int>, l_rank <int>, …
# }