From d3c6d855f9be33003d671970d88e4ccbe0042cfd Mon Sep 17 00:00:00 2001 From: saiemgilani Date: Thu, 26 Nov 2026 06:00:42 -0500 Subject: [PATCH 1/5] docs(load_models): complete the returns tables of the three model loaders load_wnba_player_impact() now lists all 76 columns of the release files (was 28), load_wbb_ratings() all 16 (was 11) and load_wbb_player_value() all 9 (was 8). Correct the load_wbb_player_value() player_id description (ESPN athlete id, not stats.ncaa.org) and drop the KenPom-style wording. --- NEWS.md | 5 +++ R/load_models.R | 63 ++++++++++++++++++++++++++++++++++-- man/load_wbb_player_value.Rd | 63 ++++++++++++++++++++++++++++++++++-- 3 files changed, 125 insertions(+), 6 deletions(-) diff --git a/NEWS.md b/NEWS.md index 16178f928..c30c012cc 100644 --- a/NEWS.md +++ b/NEWS.md @@ -484,6 +484,11 @@ the `httr2` and `testthat` floors (see Dependencies). (#84) * `load_ncaa_wbb_rapm_within_team()` documented `rapm_net` as `rapm_off + rapm_def`. The data has `rapm_net = rapm_off - rapm_def`, because `rapm_def` is on a points-allowed scale (lower is better). The docs now say so. +* The returns tables of the three model loaders now list every column of the published files: + `load_wnba_player_impact()` 76 (was 28; adds the `_n`, `_rank` and `_pct` columns of each + of the 16 ratings), `load_wbb_ratings()` 16 (was 11; adds the preseason-prior `_blend` columns, + `rank_blend` and `prior_games`) and `load_wbb_player_value()` 9 (was 8; adds `qualified`). + `load_wbb_player_value()` documented `player_id` as a stats.ncaa.org id; it is the ESPN athlete id. * The installed help is a third smaller (4.4 MB to 3.0 MB). The help pages of the 9 largest function families (ESPN WNBA and WBB, WNBA Player and Team, FIBA, TBF, SCB, NBL Rosetta, WJBL) link to one family index page (`?family_espn_wnba`, `?family_tbf`, ...) in "See also" diff --git a/R/load_models.R b/R/load_models.R index f6ac41a35..20d3da5e2 100644 --- a/R/load_models.R +++ b/R/load_models.R @@ -30,6 +30,9 @@ #' @param dbConnection A `DBIConnection` object, as returned by [DBI::dbConnect()] #' @param tablename The name of the data table within the database #' @return Returns a `wehoop_data` tibble with one row per player-team-season. +#' Each of the 16 ratings gets an `_n` (sample size), `_rank` and `_pct` +#' column, computed within each season and season type. The sample gates +#' are regular-season sized, so most playoff ranks are null. #' #' \if{html}{\tabular{lll}{ #' col_name \tab types \tab description \cr @@ -61,6 +64,54 @@ #' boban_filtered_skill \tab numeric \tab DARKO-style filtered skill rating. \cr #' boban_projected_rating \tab numeric \tab DARKO-style forward-looking projected rating. \cr #' boban_projected_sd \tab numeric \tab Standard deviation of the DARKO-style projected rating. \cr +#' o_rapm_n \tab integer \tab Possessions o_rapm is measured over (off_poss). Its rank and percentile are set only when it reaches 610, the WNBA sample at which an offensive on-court rating is half signal. \cr +#' d_rapm_n \tab integer \tab Possessions d_rapm is measured over (def_poss). Its rank and percentile are set only when it reaches 1,200, the WNBA sample at which a defensive on-court rating is half signal. \cr +#' rapm_n \tab integer \tab Possessions rapm is measured over (off_poss + def_poss). Its rank and percentile are set only when it reaches 1,600, the WNBA sample at which a net on-court rating is half signal. \cr +#' o_adj_rapm_n \tab integer \tab Possessions o_adj_rapm is measured over (off_poss). Its rank and percentile are set only when it reaches 610, the WNBA sample at which an offensive on-court rating is half signal. \cr +#' d_adj_rapm_n \tab integer \tab Possessions d_adj_rapm is measured over (def_poss). Its rank and percentile are set only when it reaches 1,200, the WNBA sample at which a defensive on-court rating is half signal. \cr +#' adj_rapm_n \tab integer \tab Possessions adj_rapm is measured over (off_poss + def_poss). Its rank and percentile are set only when it reaches 1,600, the WNBA sample at which a net on-court rating is half signal. \cr +#' ospm_n \tab integer \tab Possessions ospm is measured over (off_poss). Its rank and percentile are set only when it reaches 610, the WNBA sample at which an offensive on-court rating is half signal. \cr +#' dspm_n \tab integer \tab Possessions dspm is measured over (def_poss). Its rank and percentile are set only when it reaches 1,200, the WNBA sample at which a defensive on-court rating is half signal. \cr +#' spm_n \tab integer \tab Possessions spm is measured over (off_poss + def_poss). Its rank and percentile are set only when it reaches 1,600, the WNBA sample at which a net on-court rating is half signal. \cr +#' obpm_n \tab integer \tab Possessions obpm is measured over (off_poss). Its rank and percentile are set only when it reaches 610, the WNBA sample at which an offensive on-court rating is half signal. \cr +#' dbpm_n \tab integer \tab Possessions dbpm is measured over (def_poss). Its rank and percentile are set only when it reaches 1,200, the WNBA sample at which a defensive on-court rating is half signal. \cr +#' bpm_n \tab integer \tab Possessions bpm is measured over (off_poss + def_poss). Its rank and percentile are set only when it reaches 1,600, the WNBA sample at which a net on-court rating is half signal. \cr +#' war_n \tab integer \tab Possessions behind war (off_poss + def_poss). war is a count, not a rate, so its rank has no sample gate. \cr +#' boban_filtered_skill_n \tab integer \tab Possessions behind boban_filtered_skill (off_poss + def_poss this season). A multi-season estimate takes the net gate: its rank and percentile are set only when it reaches 1,600. \cr +#' boban_projected_rating_n \tab integer \tab Possessions behind boban_projected_rating (off_poss + def_poss this season). A multi-season estimate takes the net gate: its rank and percentile are set only when it reaches 1,600. \cr +#' boban_projected_sd_n \tab integer \tab Possessions behind boban_projected_sd (off_poss + def_poss this season). A multi-season estimate takes the net gate: its rank and percentile are set only when it reaches 1,600. \cr +#' o_rapm_rank \tab numeric \tab Rank of o_rapm within the season and season type, 1 = best, ties averaged. Null when o_rapm_n is under 610 or fewer than 10 players are ranked. \cr +#' d_rapm_rank \tab numeric \tab Rank of d_rapm within the season and season type, 1 = best, ties averaged. Null when d_rapm_n is under 1,200 or fewer than 10 players are ranked. \cr +#' rapm_rank \tab numeric \tab Rank of rapm within the season and season type, 1 = best, ties averaged. Null when rapm_n is under 1,600 or fewer than 10 players are ranked. \cr +#' o_adj_rapm_rank \tab numeric \tab Rank of o_adj_rapm within the season and season type, 1 = best, ties averaged. Null when o_adj_rapm_n is under 610 or fewer than 10 players are ranked. \cr +#' d_adj_rapm_rank \tab numeric \tab Rank of d_adj_rapm within the season and season type, 1 = best, ties averaged. Null when d_adj_rapm_n is under 1,200 or fewer than 10 players are ranked. \cr +#' adj_rapm_rank \tab numeric \tab Rank of adj_rapm within the season and season type, 1 = best, ties averaged. Null when adj_rapm_n is under 1,600 or fewer than 10 players are ranked. \cr +#' ospm_rank \tab numeric \tab Rank of ospm within the season and season type, 1 = best, ties averaged. Null when ospm_n is under 610 or fewer than 10 players are ranked. \cr +#' dspm_rank \tab numeric \tab Rank of dspm within the season and season type, 1 = best, ties averaged. Null when dspm_n is under 1,200 or fewer than 10 players are ranked. \cr +#' spm_rank \tab numeric \tab Rank of spm within the season and season type, 1 = best, ties averaged. Null when spm_n is under 1,600 or fewer than 10 players are ranked. \cr +#' obpm_rank \tab numeric \tab Rank of obpm within the season and season type, 1 = best, ties averaged. Null when obpm_n is under 610 or fewer than 10 players are ranked. \cr +#' dbpm_rank \tab numeric \tab Rank of dbpm within the season and season type, 1 = best, ties averaged. Null when dbpm_n is under 1,200 or fewer than 10 players are ranked. \cr +#' bpm_rank \tab numeric \tab Rank of bpm within the season and season type, 1 = best, ties averaged. Null when bpm_n is under 1,600 or fewer than 10 players are ranked. \cr +#' war_rank \tab numeric \tab Rank of war within the season and season type, 1 = best, ties averaged. Ungated; null when fewer than 10 players are ranked. \cr +#' boban_filtered_skill_rank \tab numeric \tab Rank of boban_filtered_skill within the season and season type, 1 = best, ties averaged. Null when boban_filtered_skill_n is under 1,600 or fewer than 10 players are ranked. \cr +#' boban_projected_rating_rank \tab numeric \tab Rank of boban_projected_rating within the season and season type, 1 = best, ties averaged. Null when boban_projected_rating_n is under 1,600 or fewer than 10 players are ranked. \cr +#' boban_projected_sd_rank \tab numeric \tab Rank of boban_projected_sd within the season and season type, ascending: 1 = the smallest sd (the most certain projection), ties averaged. Null when boban_projected_sd_n is under 1,600 or fewer than 10 players are ranked. \cr +#' o_rapm_pct \tab numeric \tab Percentile of o_rapm_rank, 100 x (n + 1 - rank) / (n + 1) over the n ranked players; null where the rank is. \cr +#' d_rapm_pct \tab numeric \tab Percentile of d_rapm_rank, 100 x (n + 1 - rank) / (n + 1) over the n ranked players; null where the rank is. \cr +#' rapm_pct \tab numeric \tab Percentile of rapm_rank, 100 x (n + 1 - rank) / (n + 1) over the n ranked players; null where the rank is. \cr +#' o_adj_rapm_pct \tab numeric \tab Percentile of o_adj_rapm_rank, 100 x (n + 1 - rank) / (n + 1) over the n ranked players; null where the rank is. \cr +#' d_adj_rapm_pct \tab numeric \tab Percentile of d_adj_rapm_rank, 100 x (n + 1 - rank) / (n + 1) over the n ranked players; null where the rank is. \cr +#' adj_rapm_pct \tab numeric \tab Percentile of adj_rapm_rank, 100 x (n + 1 - rank) / (n + 1) over the n ranked players; null where the rank is. \cr +#' ospm_pct \tab numeric \tab Percentile of ospm_rank, 100 x (n + 1 - rank) / (n + 1) over the n ranked players; null where the rank is. \cr +#' dspm_pct \tab numeric \tab Percentile of dspm_rank, 100 x (n + 1 - rank) / (n + 1) over the n ranked players; null where the rank is. \cr +#' spm_pct \tab numeric \tab Percentile of spm_rank, 100 x (n + 1 - rank) / (n + 1) over the n ranked players; null where the rank is. \cr +#' obpm_pct \tab numeric \tab Percentile of obpm_rank, 100 x (n + 1 - rank) / (n + 1) over the n ranked players; null where the rank is. \cr +#' dbpm_pct \tab numeric \tab Percentile of dbpm_rank, 100 x (n + 1 - rank) / (n + 1) over the n ranked players; null where the rank is. \cr +#' bpm_pct \tab numeric \tab Percentile of bpm_rank, 100 x (n + 1 - rank) / (n + 1) over the n ranked players; null where the rank is. \cr +#' war_pct \tab numeric \tab Percentile of war_rank, 100 x (n + 1 - rank) / (n + 1) over the n ranked players; null where the rank is. \cr +#' boban_filtered_skill_pct \tab numeric \tab Percentile of boban_filtered_skill_rank, 100 x (n + 1 - rank) / (n + 1) over the n ranked players; null where the rank is. \cr +#' boban_projected_rating_pct \tab numeric \tab Percentile of boban_projected_rating_rank, 100 x (n + 1 - rank) / (n + 1) over the n ranked players; null where the rank is. \cr +#' boban_projected_sd_pct \tab numeric \tab Percentile of boban_projected_sd_rank, 100 x (n + 1 - rank) / (n + 1) over the n ranked players: high means a more certain projection. Null where the rank is. \cr #' }} #' \if{latex}{See the HTML help or pkgdown reference for the column table.} #' @@ -128,7 +179,7 @@ NULL #' #' \if{html}{\tabular{lll}{ #' col_name \tab types \tab description \cr -#' player_id \tab character \tab stats.ncaa.org player identifier. \cr +#' player_id \tab character \tab ESPN athlete identifier (the box score's athlete_id, as a string). \cr #' player \tab character \tab Player display name (title-cased). \cr #' season \tab integer \tab Season identifier (4-digit season-ending year). \cr #' team_id \tab character \tab Unique team identifier. \cr @@ -136,6 +187,7 @@ NULL #' box_obpm \tab numeric \tab Box-score offensive box plus-minus. \cr #' box_dbpm \tab numeric \tab Box-score defensive box plus-minus. \cr #' box_bpm \tab numeric \tab Box-score net box plus-minus (box_obpm + box_dbpm). \cr +#' qualified \tab logical \tab TRUE when min is at least 300, the floor where the spread of box_bpm reaches its high-minute plateau. An additive flag: no row is dropped. \cr #' }} #' \if{latex}{See the HTML help or pkgdown reference for the column table.} #' @@ -188,8 +240,8 @@ load_wbb_player_value <- function(seasons = most_recent_wbb_season(), #' @description Loads season-level NCAA women's college basketball team #' ratings -- one row per team-season, with adjusted #' (opponent-strength-normalized) offensive/defensive efficiency, adjusted -#' tempo, raw efficiency, and a national rank. A KenPom-style -#' adjusted-efficiency-margin rating. This tag is parquet-only, with no +#' tempo, raw efficiency, and a national rank, solved as an iterative fixed +#' point. This tag is parquet-only, with no #' csv/rds sibling assets. Produced by the sportsdataverse-py NCAA WBB model program; #' published to the `wbb_ratings` release tag. #' @param ... Additional arguments passed to an underlying function that writes @@ -211,6 +263,11 @@ load_wbb_player_value <- function(seasons = most_recent_wbb_season(), #' games \tab integer \tab Games played (season total). \cr #' rank \tab integer \tab National rank by adj_em. \cr #' adj_em_z \tab numeric \tab Z-score of adj_em relative to the season's team distribution. \cr +#' adj_o_blend \tab numeric \tab Adjusted offensive efficiency with the preseason prior blended in: the same fixed point as adj_o, with each Division I team shrunk toward last season's regressed rating as if it had played prior_games extra games at it. \cr +#' adj_d_blend \tab numeric \tab Adjusted defensive efficiency with the preseason prior blended in, on the same basis as adj_o_blend (lower is better). \cr +#' adj_em_blend \tab numeric \tab adj_o_blend minus adj_d_blend. A team with g games is rated about g / (g + prior_games) on this season. \cr +#' rank_blend \tab integer \tab National rank by adj_em_blend (dense, 1 = best). \cr +#' prior_games \tab numeric \tab Weight of the preseason prior, in games (3 for women's). 0 when the previous season is not released; the blend then equals the unblended rating. \cr #' }} #' \if{latex}{See the HTML help or pkgdown reference for the column table.} #' diff --git a/man/load_wbb_player_value.Rd b/man/load_wbb_player_value.Rd index c374564a0..74e4fcc1c 100644 --- a/man/load_wbb_player_value.Rd +++ b/man/load_wbb_player_value.Rd @@ -55,6 +55,9 @@ the season data into a database.} } \value{ Returns a \code{wehoop_data} tibble with one row per player-team-season. +Each of the 16 ratings gets an \verb{_n} (sample size), \verb{_rank} and \verb{_pct} +column, computed within each season and season type. The sample gates +are regular-season sized, so most playoff ranks are null. \if{html}{\tabular{lll}{ col_name \tab types \tab description \cr @@ -86,6 +89,54 @@ Returns a \code{wehoop_data} tibble with one row per player-team-season. boban_filtered_skill \tab numeric \tab DARKO-style filtered skill rating. \cr boban_projected_rating \tab numeric \tab DARKO-style forward-looking projected rating. \cr boban_projected_sd \tab numeric \tab Standard deviation of the DARKO-style projected rating. \cr + o_rapm_n \tab integer \tab Possessions o_rapm is measured over (off_poss). Its rank and percentile are set only when it reaches 610, the WNBA sample at which an offensive on-court rating is half signal. \cr + d_rapm_n \tab integer \tab Possessions d_rapm is measured over (def_poss). Its rank and percentile are set only when it reaches 1,200, the WNBA sample at which a defensive on-court rating is half signal. \cr + rapm_n \tab integer \tab Possessions rapm is measured over (off_poss + def_poss). Its rank and percentile are set only when it reaches 1,600, the WNBA sample at which a net on-court rating is half signal. \cr + o_adj_rapm_n \tab integer \tab Possessions o_adj_rapm is measured over (off_poss). Its rank and percentile are set only when it reaches 610, the WNBA sample at which an offensive on-court rating is half signal. \cr + d_adj_rapm_n \tab integer \tab Possessions d_adj_rapm is measured over (def_poss). Its rank and percentile are set only when it reaches 1,200, the WNBA sample at which a defensive on-court rating is half signal. \cr + adj_rapm_n \tab integer \tab Possessions adj_rapm is measured over (off_poss + def_poss). Its rank and percentile are set only when it reaches 1,600, the WNBA sample at which a net on-court rating is half signal. \cr + ospm_n \tab integer \tab Possessions ospm is measured over (off_poss). Its rank and percentile are set only when it reaches 610, the WNBA sample at which an offensive on-court rating is half signal. \cr + dspm_n \tab integer \tab Possessions dspm is measured over (def_poss). Its rank and percentile are set only when it reaches 1,200, the WNBA sample at which a defensive on-court rating is half signal. \cr + spm_n \tab integer \tab Possessions spm is measured over (off_poss + def_poss). Its rank and percentile are set only when it reaches 1,600, the WNBA sample at which a net on-court rating is half signal. \cr + obpm_n \tab integer \tab Possessions obpm is measured over (off_poss). Its rank and percentile are set only when it reaches 610, the WNBA sample at which an offensive on-court rating is half signal. \cr + dbpm_n \tab integer \tab Possessions dbpm is measured over (def_poss). Its rank and percentile are set only when it reaches 1,200, the WNBA sample at which a defensive on-court rating is half signal. \cr + bpm_n \tab integer \tab Possessions bpm is measured over (off_poss + def_poss). Its rank and percentile are set only when it reaches 1,600, the WNBA sample at which a net on-court rating is half signal. \cr + war_n \tab integer \tab Possessions behind war (off_poss + def_poss). war is a count, not a rate, so its rank has no sample gate. \cr + boban_filtered_skill_n \tab integer \tab Possessions behind boban_filtered_skill (off_poss + def_poss this season). A multi-season estimate takes the net gate: its rank and percentile are set only when it reaches 1,600. \cr + boban_projected_rating_n \tab integer \tab Possessions behind boban_projected_rating (off_poss + def_poss this season). A multi-season estimate takes the net gate: its rank and percentile are set only when it reaches 1,600. \cr + boban_projected_sd_n \tab integer \tab Possessions behind boban_projected_sd (off_poss + def_poss this season). A multi-season estimate takes the net gate: its rank and percentile are set only when it reaches 1,600. \cr + o_rapm_rank \tab numeric \tab Rank of o_rapm within the season and season type, 1 = best, ties averaged. Null when o_rapm_n is under 610 or fewer than 10 players are ranked. \cr + d_rapm_rank \tab numeric \tab Rank of d_rapm within the season and season type, 1 = best, ties averaged. Null when d_rapm_n is under 1,200 or fewer than 10 players are ranked. \cr + rapm_rank \tab numeric \tab Rank of rapm within the season and season type, 1 = best, ties averaged. Null when rapm_n is under 1,600 or fewer than 10 players are ranked. \cr + o_adj_rapm_rank \tab numeric \tab Rank of o_adj_rapm within the season and season type, 1 = best, ties averaged. Null when o_adj_rapm_n is under 610 or fewer than 10 players are ranked. \cr + d_adj_rapm_rank \tab numeric \tab Rank of d_adj_rapm within the season and season type, 1 = best, ties averaged. Null when d_adj_rapm_n is under 1,200 or fewer than 10 players are ranked. \cr + adj_rapm_rank \tab numeric \tab Rank of adj_rapm within the season and season type, 1 = best, ties averaged. Null when adj_rapm_n is under 1,600 or fewer than 10 players are ranked. \cr + ospm_rank \tab numeric \tab Rank of ospm within the season and season type, 1 = best, ties averaged. Null when ospm_n is under 610 or fewer than 10 players are ranked. \cr + dspm_rank \tab numeric \tab Rank of dspm within the season and season type, 1 = best, ties averaged. Null when dspm_n is under 1,200 or fewer than 10 players are ranked. \cr + spm_rank \tab numeric \tab Rank of spm within the season and season type, 1 = best, ties averaged. Null when spm_n is under 1,600 or fewer than 10 players are ranked. \cr + obpm_rank \tab numeric \tab Rank of obpm within the season and season type, 1 = best, ties averaged. Null when obpm_n is under 610 or fewer than 10 players are ranked. \cr + dbpm_rank \tab numeric \tab Rank of dbpm within the season and season type, 1 = best, ties averaged. Null when dbpm_n is under 1,200 or fewer than 10 players are ranked. \cr + bpm_rank \tab numeric \tab Rank of bpm within the season and season type, 1 = best, ties averaged. Null when bpm_n is under 1,600 or fewer than 10 players are ranked. \cr + war_rank \tab numeric \tab Rank of war within the season and season type, 1 = best, ties averaged. Ungated; null when fewer than 10 players are ranked. \cr + boban_filtered_skill_rank \tab numeric \tab Rank of boban_filtered_skill within the season and season type, 1 = best, ties averaged. Null when boban_filtered_skill_n is under 1,600 or fewer than 10 players are ranked. \cr + boban_projected_rating_rank \tab numeric \tab Rank of boban_projected_rating within the season and season type, 1 = best, ties averaged. Null when boban_projected_rating_n is under 1,600 or fewer than 10 players are ranked. \cr + boban_projected_sd_rank \tab numeric \tab Rank of boban_projected_sd within the season and season type, ascending: 1 = the smallest sd (the most certain projection), ties averaged. Null when boban_projected_sd_n is under 1,600 or fewer than 10 players are ranked. \cr + o_rapm_pct \tab numeric \tab Percentile of o_rapm_rank, 100 x (n + 1 - rank) / (n + 1) over the n ranked players; null where the rank is. \cr + d_rapm_pct \tab numeric \tab Percentile of d_rapm_rank, 100 x (n + 1 - rank) / (n + 1) over the n ranked players; null where the rank is. \cr + rapm_pct \tab numeric \tab Percentile of rapm_rank, 100 x (n + 1 - rank) / (n + 1) over the n ranked players; null where the rank is. \cr + o_adj_rapm_pct \tab numeric \tab Percentile of o_adj_rapm_rank, 100 x (n + 1 - rank) / (n + 1) over the n ranked players; null where the rank is. \cr + d_adj_rapm_pct \tab numeric \tab Percentile of d_adj_rapm_rank, 100 x (n + 1 - rank) / (n + 1) over the n ranked players; null where the rank is. \cr + adj_rapm_pct \tab numeric \tab Percentile of adj_rapm_rank, 100 x (n + 1 - rank) / (n + 1) over the n ranked players; null where the rank is. \cr + ospm_pct \tab numeric \tab Percentile of ospm_rank, 100 x (n + 1 - rank) / (n + 1) over the n ranked players; null where the rank is. \cr + dspm_pct \tab numeric \tab Percentile of dspm_rank, 100 x (n + 1 - rank) / (n + 1) over the n ranked players; null where the rank is. \cr + spm_pct \tab numeric \tab Percentile of spm_rank, 100 x (n + 1 - rank) / (n + 1) over the n ranked players; null where the rank is. \cr + obpm_pct \tab numeric \tab Percentile of obpm_rank, 100 x (n + 1 - rank) / (n + 1) over the n ranked players; null where the rank is. \cr + dbpm_pct \tab numeric \tab Percentile of dbpm_rank, 100 x (n + 1 - rank) / (n + 1) over the n ranked players; null where the rank is. \cr + bpm_pct \tab numeric \tab Percentile of bpm_rank, 100 x (n + 1 - rank) / (n + 1) over the n ranked players; null where the rank is. \cr + war_pct \tab numeric \tab Percentile of war_rank, 100 x (n + 1 - rank) / (n + 1) over the n ranked players; null where the rank is. \cr + boban_filtered_skill_pct \tab numeric \tab Percentile of boban_filtered_skill_rank, 100 x (n + 1 - rank) / (n + 1) over the n ranked players; null where the rank is. \cr + boban_projected_rating_pct \tab numeric \tab Percentile of boban_projected_rating_rank, 100 x (n + 1 - rank) / (n + 1) over the n ranked players; null where the rank is. \cr + boban_projected_sd_pct \tab numeric \tab Percentile of boban_projected_sd_rank, 100 x (n + 1 - rank) / (n + 1) over the n ranked players: high means a more certain projection. Null where the rank is. \cr }} \if{latex}{See the HTML help or pkgdown reference for the column table.} @@ -93,7 +144,7 @@ Returns a \code{wehoop_data} tibble with one row per player-team-season. \if{html}{\tabular{lll}{ col_name \tab types \tab description \cr - player_id \tab character \tab stats.ncaa.org player identifier. \cr + player_id \tab character \tab ESPN athlete identifier (the box score's athlete_id, as a string). \cr player \tab character \tab Player display name (title-cased). \cr season \tab integer \tab Season identifier (4-digit season-ending year). \cr team_id \tab character \tab Unique team identifier. \cr @@ -101,6 +152,7 @@ Returns a \code{wehoop_data} tibble with one row per player-team-season. box_obpm \tab numeric \tab Box-score offensive box plus-minus. \cr box_dbpm \tab numeric \tab Box-score defensive box plus-minus. \cr box_bpm \tab numeric \tab Box-score net box plus-minus (box_obpm + box_dbpm). \cr + qualified \tab logical \tab TRUE when min is at least 300, the floor where the spread of box_bpm reaches its high-minute plateau. An additive flag: no row is dropped. \cr }} \if{latex}{See the HTML help or pkgdown reference for the column table.} @@ -119,6 +171,11 @@ Returns a \code{wehoop_data} tibble with one row per team-season. games \tab integer \tab Games played (season total). \cr rank \tab integer \tab National rank by adj_em. \cr adj_em_z \tab numeric \tab Z-score of adj_em relative to the season's team distribution. \cr + adj_o_blend \tab numeric \tab Adjusted offensive efficiency with the preseason prior blended in: the same fixed point as adj_o, with each Division I team shrunk toward last season's regressed rating as if it had played prior_games extra games at it. \cr + adj_d_blend \tab numeric \tab Adjusted defensive efficiency with the preseason prior blended in, on the same basis as adj_o_blend (lower is better). \cr + adj_em_blend \tab numeric \tab adj_o_blend minus adj_d_blend. A team with g games is rated about g / (g + prior_games) on this season. \cr + rank_blend \tab integer \tab National rank by adj_em_blend (dense, 1 = best). \cr + prior_games \tab numeric \tab Weight of the preseason prior, in games (3 for women's). 0 when the previous season is not released; the blend then equals the unblended rating. \cr }} \if{latex}{See the HTML help or pkgdown reference for the column table.} } @@ -141,8 +198,8 @@ published to the \code{wbb_player_value} release tag. Loads season-level NCAA women's college basketball team ratings -- one row per team-season, with adjusted (opponent-strength-normalized) offensive/defensive efficiency, adjusted -tempo, raw efficiency, and a national rank. A KenPom-style -adjusted-efficiency-margin rating. This tag is parquet-only, with no +tempo, raw efficiency, and a national rank, solved as an iterative fixed +point. This tag is parquet-only, with no csv/rds sibling assets. Produced by the sportsdataverse-py NCAA WBB model program; published to the \code{wbb_ratings} release tag. } From 067e7f9a7b68ac819b7ea683528eb10f6ed61eb1 Mon Sep 17 00:00:00 2001 From: saiemgilani Date: Thu, 26 Nov 2026 07:03:35 -0500 Subject: [PATCH 2/5] docs(load_models): state the new-team prior in the blended ratings columns --- R/load_models.R | 2 +- man/load_wbb_player_value.Rd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/R/load_models.R b/R/load_models.R index 20d3da5e2..eb07c12c6 100644 --- a/R/load_models.R +++ b/R/load_models.R @@ -263,7 +263,7 @@ load_wbb_player_value <- function(seasons = most_recent_wbb_season(), #' games \tab integer \tab Games played (season total). \cr #' rank \tab integer \tab National rank by adj_em. \cr #' adj_em_z \tab numeric \tab Z-score of adj_em relative to the season's team distribution. \cr -#' adj_o_blend \tab numeric \tab Adjusted offensive efficiency with the preseason prior blended in: the same fixed point as adj_o, with each Division I team shrunk toward last season's regressed rating as if it had played prior_games extra games at it. \cr +#' adj_o_blend \tab numeric \tab Adjusted offensive efficiency with the preseason prior blended in: the same fixed point as adj_o, with each Division I team shrunk toward last season's regressed rating as if it had played prior_games extra games at it. A team new to Division I (or with no rated game last season) is shrunk toward the 23rd percentile of last season's Division I adj_em instead. \cr #' adj_d_blend \tab numeric \tab Adjusted defensive efficiency with the preseason prior blended in, on the same basis as adj_o_blend (lower is better). \cr #' adj_em_blend \tab numeric \tab adj_o_blend minus adj_d_blend. A team with g games is rated about g / (g + prior_games) on this season. \cr #' rank_blend \tab integer \tab National rank by adj_em_blend (dense, 1 = best). \cr diff --git a/man/load_wbb_player_value.Rd b/man/load_wbb_player_value.Rd index 74e4fcc1c..f71242493 100644 --- a/man/load_wbb_player_value.Rd +++ b/man/load_wbb_player_value.Rd @@ -171,7 +171,7 @@ Returns a \code{wehoop_data} tibble with one row per team-season. games \tab integer \tab Games played (season total). \cr rank \tab integer \tab National rank by adj_em. \cr adj_em_z \tab numeric \tab Z-score of adj_em relative to the season's team distribution. \cr - adj_o_blend \tab numeric \tab Adjusted offensive efficiency with the preseason prior blended in: the same fixed point as adj_o, with each Division I team shrunk toward last season's regressed rating as if it had played prior_games extra games at it. \cr + adj_o_blend \tab numeric \tab Adjusted offensive efficiency with the preseason prior blended in: the same fixed point as adj_o, with each Division I team shrunk toward last season's regressed rating as if it had played prior_games extra games at it. A team new to Division I (or with no rated game last season) is shrunk toward the 23rd percentile of last season's Division I adj_em instead. \cr adj_d_blend \tab numeric \tab Adjusted defensive efficiency with the preseason prior blended in, on the same basis as adj_o_blend (lower is better). \cr adj_em_blend \tab numeric \tab adj_o_blend minus adj_d_blend. A team with g games is rated about g / (g + prior_games) on this season. \cr rank_blend \tab integer \tab National rank by adj_em_blend (dense, 1 = best). \cr From 1d8d972093a75f65bd51f3e7ebdd7759e4f84258 Mon Sep 17 00:00:00 2001 From: saiemgilani Date: Thu, 26 Nov 2026 11:51:08 -0500 Subject: [PATCH 3/5] docs(load_models): label the shared returns tables and correct adj_rapm, rank and vignette claims Every gated playoff rank is null; o_adj_rapm/d_adj_rapm are RAPM with a ridge prior toward last season's SPM; rank nulls include a null rating; rank/rank_blend cover every team in the file; prior_games is 0 when the previous season is unratable. The team-ratings and player-value articles no longer claim 2015 is missing, that there is no preseason prior, or that older files lack qualified. --- NEWS.md | 6 +- R/load_models.R | 59 ++++++++++--------- man/load_wbb_player_value.Rd | 59 ++++++++++--------- ...-college-basketball-player-value-model.Rmd | 6 +- ...-college-basketball-team-ratings-model.Rmd | 9 ++- 5 files changed, 74 insertions(+), 65 deletions(-) diff --git a/NEWS.md b/NEWS.md index c30c012cc..ef209c999 100644 --- a/NEWS.md +++ b/NEWS.md @@ -486,8 +486,12 @@ the `httr2` and `testthat` floors (see Dependencies). (#84) is better). The docs now say so. * The returns tables of the three model loaders now list every column of the published files: `load_wnba_player_impact()` 76 (was 28; adds the `_n`, `_rank` and `_pct` columns of each - of the 16 ratings), `load_wbb_ratings()` 16 (was 11; adds the preseason-prior `_blend` columns, + of the 16 ratings), `load_wbb_ratings()` 16 (was 11; adds `adj_o_blend`, `adj_d_blend`, `adj_em_blend`, `rank_blend` and `prior_games`) and `load_wbb_player_value()` 9 (was 8; adds `qualified`). + `o_adj_rapm` / `d_adj_rapm` were documented as adjusted for minutes/possession stability; they + are RAPM fitted with a ridge prior toward the previous season's SPM. The team-ratings and + player-value articles no longer say 2015 is missing, that there is no preseason prior, or that + older files lack `qualified`. `load_wbb_player_value()` documented `player_id` as a stats.ncaa.org id; it is the ESPN athlete id. * The installed help is a third smaller (4.4 MB to 3.0 MB). The help pages of the 9 largest function families (ESPN WNBA and WBB, WNBA Player and Team, FIBA, TBF, SCB, NBL Rosetta, diff --git a/R/load_models.R b/R/load_models.R index eb07c12c6..a73d9b1f0 100644 --- a/R/load_models.R +++ b/R/load_models.R @@ -29,10 +29,13 @@ #' the season data into a database. #' @param dbConnection A `DBIConnection` object, as returned by [DBI::dbConnect()] #' @param tablename The name of the data table within the database -#' @return Returns a `wehoop_data` tibble with one row per player-team-season. +#' @return `load_wnba_player_impact()` returns a `wehoop_data` tibble with one +#' row per player-team-season. #' Each of the 16 ratings gets an `_n` (sample size), `_rank` and `_pct` #' column, computed within each season and season type. The sample gates -#' are regular-season sized, so most playoff ranks are null. +#' are regular-season sized: in the published 1997-2026 files no season has +#' 10 playoff players past a gate, so every playoff `_rank` and `_pct` is +#' null except `war_rank` and `war_pct`. #' #' \if{html}{\tabular{lll}{ #' col_name \tab types \tab description \cr @@ -49,8 +52,8 @@ #' rapm \tab numeric \tab Net regularized adjusted plus-minus (o_rapm + d_rapm). \cr #' off_poss \tab integer \tab Offensive possessions used in the RAPM fit. \cr #' def_poss \tab integer \tab Defensive possessions used in the RAPM fit. \cr -#' o_adj_rapm \tab numeric \tab Offensive RAPM adjusted for minutes/possession stability. \cr -#' d_adj_rapm \tab numeric \tab Defensive RAPM adjusted for minutes/possession stability. \cr +#' o_adj_rapm \tab numeric \tab Offensive RAPM fitted with a ridge prior toward the previous season's SPM (instead of shrinking to zero). \cr +#' d_adj_rapm \tab numeric \tab Defensive RAPM fitted with a ridge prior toward the previous season's SPM (instead of shrinking to zero). \cr #' adj_rapm \tab numeric \tab Net adjusted RAPM (o_adj_rapm + d_adj_rapm). \cr #' ospm \tab numeric \tab Offensive statistical plus-minus (box-score component). \cr #' dspm \tab numeric \tab Defensive statistical plus-minus (box-score component). \cr @@ -80,22 +83,22 @@ #' boban_filtered_skill_n \tab integer \tab Possessions behind boban_filtered_skill (off_poss + def_poss this season). A multi-season estimate takes the net gate: its rank and percentile are set only when it reaches 1,600. \cr #' boban_projected_rating_n \tab integer \tab Possessions behind boban_projected_rating (off_poss + def_poss this season). A multi-season estimate takes the net gate: its rank and percentile are set only when it reaches 1,600. \cr #' boban_projected_sd_n \tab integer \tab Possessions behind boban_projected_sd (off_poss + def_poss this season). A multi-season estimate takes the net gate: its rank and percentile are set only when it reaches 1,600. \cr -#' o_rapm_rank \tab numeric \tab Rank of o_rapm within the season and season type, 1 = best, ties averaged. Null when o_rapm_n is under 610 or fewer than 10 players are ranked. \cr -#' d_rapm_rank \tab numeric \tab Rank of d_rapm within the season and season type, 1 = best, ties averaged. Null when d_rapm_n is under 1,200 or fewer than 10 players are ranked. \cr -#' rapm_rank \tab numeric \tab Rank of rapm within the season and season type, 1 = best, ties averaged. Null when rapm_n is under 1,600 or fewer than 10 players are ranked. \cr -#' o_adj_rapm_rank \tab numeric \tab Rank of o_adj_rapm within the season and season type, 1 = best, ties averaged. Null when o_adj_rapm_n is under 610 or fewer than 10 players are ranked. \cr -#' d_adj_rapm_rank \tab numeric \tab Rank of d_adj_rapm within the season and season type, 1 = best, ties averaged. Null when d_adj_rapm_n is under 1,200 or fewer than 10 players are ranked. \cr -#' adj_rapm_rank \tab numeric \tab Rank of adj_rapm within the season and season type, 1 = best, ties averaged. Null when adj_rapm_n is under 1,600 or fewer than 10 players are ranked. \cr -#' ospm_rank \tab numeric \tab Rank of ospm within the season and season type, 1 = best, ties averaged. Null when ospm_n is under 610 or fewer than 10 players are ranked. \cr -#' dspm_rank \tab numeric \tab Rank of dspm within the season and season type, 1 = best, ties averaged. Null when dspm_n is under 1,200 or fewer than 10 players are ranked. \cr -#' spm_rank \tab numeric \tab Rank of spm within the season and season type, 1 = best, ties averaged. Null when spm_n is under 1,600 or fewer than 10 players are ranked. \cr -#' obpm_rank \tab numeric \tab Rank of obpm within the season and season type, 1 = best, ties averaged. Null when obpm_n is under 610 or fewer than 10 players are ranked. \cr -#' dbpm_rank \tab numeric \tab Rank of dbpm within the season and season type, 1 = best, ties averaged. Null when dbpm_n is under 1,200 or fewer than 10 players are ranked. \cr -#' bpm_rank \tab numeric \tab Rank of bpm within the season and season type, 1 = best, ties averaged. Null when bpm_n is under 1,600 or fewer than 10 players are ranked. \cr -#' war_rank \tab numeric \tab Rank of war within the season and season type, 1 = best, ties averaged. Ungated; null when fewer than 10 players are ranked. \cr -#' boban_filtered_skill_rank \tab numeric \tab Rank of boban_filtered_skill within the season and season type, 1 = best, ties averaged. Null when boban_filtered_skill_n is under 1,600 or fewer than 10 players are ranked. \cr -#' boban_projected_rating_rank \tab numeric \tab Rank of boban_projected_rating within the season and season type, 1 = best, ties averaged. Null when boban_projected_rating_n is under 1,600 or fewer than 10 players are ranked. \cr -#' boban_projected_sd_rank \tab numeric \tab Rank of boban_projected_sd within the season and season type, ascending: 1 = the smallest sd (the most certain projection), ties averaged. Null when boban_projected_sd_n is under 1,600 or fewer than 10 players are ranked. \cr +#' o_rapm_rank \tab numeric \tab Rank of o_rapm within the season and season type, 1 = best, ties averaged. Null when o_rapm is null, o_rapm_n is under 610, or fewer than 10 players are ranked. \cr +#' d_rapm_rank \tab numeric \tab Rank of d_rapm within the season and season type, 1 = best, ties averaged. Null when d_rapm is null, d_rapm_n is under 1,200, or fewer than 10 players are ranked. \cr +#' rapm_rank \tab numeric \tab Rank of rapm within the season and season type, 1 = best, ties averaged. Null when rapm is null, rapm_n is under 1,600, or fewer than 10 players are ranked. \cr +#' o_adj_rapm_rank \tab numeric \tab Rank of o_adj_rapm within the season and season type, 1 = best, ties averaged. Null when o_adj_rapm is null, o_adj_rapm_n is under 610, or fewer than 10 players are ranked. \cr +#' d_adj_rapm_rank \tab numeric \tab Rank of d_adj_rapm within the season and season type, 1 = best, ties averaged. Null when d_adj_rapm is null, d_adj_rapm_n is under 1,200, or fewer than 10 players are ranked. \cr +#' adj_rapm_rank \tab numeric \tab Rank of adj_rapm within the season and season type, 1 = best, ties averaged. Null when adj_rapm is null, adj_rapm_n is under 1,600, or fewer than 10 players are ranked. \cr +#' ospm_rank \tab numeric \tab Rank of ospm within the season and season type, 1 = best, ties averaged. Null when ospm is null, ospm_n is under 610, or fewer than 10 players are ranked. \cr +#' dspm_rank \tab numeric \tab Rank of dspm within the season and season type, 1 = best, ties averaged. Null when dspm is null, dspm_n is under 1,200, or fewer than 10 players are ranked. \cr +#' spm_rank \tab numeric \tab Rank of spm within the season and season type, 1 = best, ties averaged. Null when spm is null, spm_n is under 1,600, or fewer than 10 players are ranked. \cr +#' obpm_rank \tab numeric \tab Rank of obpm within the season and season type, 1 = best, ties averaged. Null when obpm is null, obpm_n is under 610, or fewer than 10 players are ranked. \cr +#' dbpm_rank \tab numeric \tab Rank of dbpm within the season and season type, 1 = best, ties averaged. Null when dbpm is null, dbpm_n is under 1,200, or fewer than 10 players are ranked. \cr +#' bpm_rank \tab numeric \tab Rank of bpm within the season and season type, 1 = best, ties averaged. Null when bpm is null, bpm_n is under 1,600, or fewer than 10 players are ranked. \cr +#' war_rank \tab numeric \tab Rank of war within the season and season type, 1 = best, ties averaged. Ungated; null when war is null or fewer than 10 players are ranked. \cr +#' boban_filtered_skill_rank \tab numeric \tab Rank of boban_filtered_skill within the season and season type, 1 = best, ties averaged. Null when boban_filtered_skill is null, boban_filtered_skill_n is under 1,600, or fewer than 10 players are ranked. \cr +#' boban_projected_rating_rank \tab numeric \tab Rank of boban_projected_rating within the season and season type, 1 = best, ties averaged. Null when boban_projected_rating is null, boban_projected_rating_n is under 1,600, or fewer than 10 players are ranked. \cr +#' boban_projected_sd_rank \tab numeric \tab Rank of boban_projected_sd within the season and season type, ascending: 1 = the smallest sd (the most certain projection), ties averaged. Null when boban_projected_sd is null, boban_projected_sd_n is under 1,600, or fewer than 10 players are ranked. \cr #' o_rapm_pct \tab numeric \tab Percentile of o_rapm_rank, 100 x (n + 1 - rank) / (n + 1) over the n ranked players; null where the rank is. \cr #' d_rapm_pct \tab numeric \tab Percentile of d_rapm_rank, 100 x (n + 1 - rank) / (n + 1) over the n ranked players; null where the rank is. \cr #' rapm_pct \tab numeric \tab Percentile of rapm_rank, 100 x (n + 1 - rank) / (n + 1) over the n ranked players; null where the rank is. \cr @@ -175,7 +178,8 @@ NULL #' the season data into a database. #' @param dbConnection A `DBIConnection` object, as returned by [DBI::dbConnect()] #' @param tablename The name of the data table within the database -#' @return Returns a `wehoop_data` tibble with one row per player-team-season. +#' @return `load_wbb_player_value()` returns a `wehoop_data` tibble with one +#' row per player-team-season. #' #' \if{html}{\tabular{lll}{ #' col_name \tab types \tab description \cr @@ -187,7 +191,7 @@ NULL #' box_obpm \tab numeric \tab Box-score offensive box plus-minus. \cr #' box_dbpm \tab numeric \tab Box-score defensive box plus-minus. \cr #' box_bpm \tab numeric \tab Box-score net box plus-minus (box_obpm + box_dbpm). \cr -#' qualified \tab logical \tab TRUE when min is at least 300, the floor where the spread of box_bpm reaches its high-minute plateau. An additive flag: no row is dropped. \cr +#' qualified \tab logical \tab TRUE when min is at least 300, the floor where the spread of box_bpm first sits within 2% of its high-minute plateau. An additive flag: no row is dropped. \cr #' }} #' \if{latex}{See the HTML help or pkgdown reference for the column table.} #' @@ -248,7 +252,8 @@ load_wbb_player_value <- function(seasons = most_recent_wbb_season(), #' the season data into a database. #' @param dbConnection A `DBIConnection` object, as returned by [DBI::dbConnect()] #' @param tablename The name of the data table within the database -#' @return Returns a `wehoop_data` tibble with one row per team-season. +#' @return `load_wbb_ratings()` returns a `wehoop_data` tibble with one row per +#' team-season. #' #' \if{html}{\tabular{lll}{ #' col_name \tab types \tab description \cr @@ -261,13 +266,13 @@ load_wbb_player_value <- function(seasons = most_recent_wbb_season(), #' raw_o \tab numeric \tab Unadjusted (raw) offensive efficiency. \cr #' raw_d \tab numeric \tab Unadjusted (raw) defensive efficiency. \cr #' games \tab integer \tab Games played (season total). \cr -#' rank \tab integer \tab National rank by adj_em. \cr +#' rank \tab integer \tab Rank by adj_em among every team in the file (dense, 1 = best; includes non-Division I opponents). \cr #' adj_em_z \tab numeric \tab Z-score of adj_em relative to the season's team distribution. \cr -#' adj_o_blend \tab numeric \tab Adjusted offensive efficiency with the preseason prior blended in: the same fixed point as adj_o, with each Division I team shrunk toward last season's regressed rating as if it had played prior_games extra games at it. A team new to Division I (or with no rated game last season) is shrunk toward the 23rd percentile of last season's Division I adj_em instead. \cr +#' adj_o_blend \tab numeric \tab Adjusted offensive efficiency with the preseason prior blended in: the same fixed point as adj_o, with each Division I team shrunk toward last season's regressed rating as if it had played prior_games extra games at it. A team new to Division I (or with no rated game last season) is shrunk toward the 23rd percentile of last season's Division I adj_em instead. Non-Division I opponents get no prior; their values move only through their Division I opponents. \cr #' adj_d_blend \tab numeric \tab Adjusted defensive efficiency with the preseason prior blended in, on the same basis as adj_o_blend (lower is better). \cr #' adj_em_blend \tab numeric \tab adj_o_blend minus adj_d_blend. A team with g games is rated about g / (g + prior_games) on this season. \cr -#' rank_blend \tab integer \tab National rank by adj_em_blend (dense, 1 = best). \cr -#' prior_games \tab numeric \tab Weight of the preseason prior, in games (3 for women's). 0 when the previous season is not released; the blend then equals the unblended rating. \cr +#' rank_blend \tab integer \tab Rank by adj_em_blend among every team in the file (dense, 1 = best; includes non-Division I opponents). \cr +#' prior_games \tab numeric \tab Weight of the preseason prior, in games (3). 0 when the previous season has no ratable games (2009); the blend then equals the unblended rating. \cr #' }} #' \if{latex}{See the HTML help or pkgdown reference for the column table.} #' diff --git a/man/load_wbb_player_value.Rd b/man/load_wbb_player_value.Rd index f71242493..54a6cbb1d 100644 --- a/man/load_wbb_player_value.Rd +++ b/man/load_wbb_player_value.Rd @@ -54,10 +54,13 @@ the season data into a database.} \item{tablename}{The name of the data table within the database} } \value{ -Returns a \code{wehoop_data} tibble with one row per player-team-season. +\code{load_wnba_player_impact()} returns a \code{wehoop_data} tibble with one +row per player-team-season. Each of the 16 ratings gets an \verb{_n} (sample size), \verb{_rank} and \verb{_pct} column, computed within each season and season type. The sample gates -are regular-season sized, so most playoff ranks are null. +are regular-season sized: in the published 1997-2026 files no season has +10 playoff players past a gate, so every playoff \verb{_rank} and \verb{_pct} is +null except \code{war_rank} and \code{war_pct}. \if{html}{\tabular{lll}{ col_name \tab types \tab description \cr @@ -74,8 +77,8 @@ are regular-season sized, so most playoff ranks are null. rapm \tab numeric \tab Net regularized adjusted plus-minus (o_rapm + d_rapm). \cr off_poss \tab integer \tab Offensive possessions used in the RAPM fit. \cr def_poss \tab integer \tab Defensive possessions used in the RAPM fit. \cr - o_adj_rapm \tab numeric \tab Offensive RAPM adjusted for minutes/possession stability. \cr - d_adj_rapm \tab numeric \tab Defensive RAPM adjusted for minutes/possession stability. \cr + o_adj_rapm \tab numeric \tab Offensive RAPM fitted with a ridge prior toward the previous season's SPM (instead of shrinking to zero). \cr + d_adj_rapm \tab numeric \tab Defensive RAPM fitted with a ridge prior toward the previous season's SPM (instead of shrinking to zero). \cr adj_rapm \tab numeric \tab Net adjusted RAPM (o_adj_rapm + d_adj_rapm). \cr ospm \tab numeric \tab Offensive statistical plus-minus (box-score component). \cr dspm \tab numeric \tab Defensive statistical plus-minus (box-score component). \cr @@ -105,22 +108,22 @@ are regular-season sized, so most playoff ranks are null. boban_filtered_skill_n \tab integer \tab Possessions behind boban_filtered_skill (off_poss + def_poss this season). A multi-season estimate takes the net gate: its rank and percentile are set only when it reaches 1,600. \cr boban_projected_rating_n \tab integer \tab Possessions behind boban_projected_rating (off_poss + def_poss this season). A multi-season estimate takes the net gate: its rank and percentile are set only when it reaches 1,600. \cr boban_projected_sd_n \tab integer \tab Possessions behind boban_projected_sd (off_poss + def_poss this season). A multi-season estimate takes the net gate: its rank and percentile are set only when it reaches 1,600. \cr - o_rapm_rank \tab numeric \tab Rank of o_rapm within the season and season type, 1 = best, ties averaged. Null when o_rapm_n is under 610 or fewer than 10 players are ranked. \cr - d_rapm_rank \tab numeric \tab Rank of d_rapm within the season and season type, 1 = best, ties averaged. Null when d_rapm_n is under 1,200 or fewer than 10 players are ranked. \cr - rapm_rank \tab numeric \tab Rank of rapm within the season and season type, 1 = best, ties averaged. Null when rapm_n is under 1,600 or fewer than 10 players are ranked. \cr - o_adj_rapm_rank \tab numeric \tab Rank of o_adj_rapm within the season and season type, 1 = best, ties averaged. Null when o_adj_rapm_n is under 610 or fewer than 10 players are ranked. \cr - d_adj_rapm_rank \tab numeric \tab Rank of d_adj_rapm within the season and season type, 1 = best, ties averaged. Null when d_adj_rapm_n is under 1,200 or fewer than 10 players are ranked. \cr - adj_rapm_rank \tab numeric \tab Rank of adj_rapm within the season and season type, 1 = best, ties averaged. Null when adj_rapm_n is under 1,600 or fewer than 10 players are ranked. \cr - ospm_rank \tab numeric \tab Rank of ospm within the season and season type, 1 = best, ties averaged. Null when ospm_n is under 610 or fewer than 10 players are ranked. \cr - dspm_rank \tab numeric \tab Rank of dspm within the season and season type, 1 = best, ties averaged. Null when dspm_n is under 1,200 or fewer than 10 players are ranked. \cr - spm_rank \tab numeric \tab Rank of spm within the season and season type, 1 = best, ties averaged. Null when spm_n is under 1,600 or fewer than 10 players are ranked. \cr - obpm_rank \tab numeric \tab Rank of obpm within the season and season type, 1 = best, ties averaged. Null when obpm_n is under 610 or fewer than 10 players are ranked. \cr - dbpm_rank \tab numeric \tab Rank of dbpm within the season and season type, 1 = best, ties averaged. Null when dbpm_n is under 1,200 or fewer than 10 players are ranked. \cr - bpm_rank \tab numeric \tab Rank of bpm within the season and season type, 1 = best, ties averaged. Null when bpm_n is under 1,600 or fewer than 10 players are ranked. \cr - war_rank \tab numeric \tab Rank of war within the season and season type, 1 = best, ties averaged. Ungated; null when fewer than 10 players are ranked. \cr - boban_filtered_skill_rank \tab numeric \tab Rank of boban_filtered_skill within the season and season type, 1 = best, ties averaged. Null when boban_filtered_skill_n is under 1,600 or fewer than 10 players are ranked. \cr - boban_projected_rating_rank \tab numeric \tab Rank of boban_projected_rating within the season and season type, 1 = best, ties averaged. Null when boban_projected_rating_n is under 1,600 or fewer than 10 players are ranked. \cr - boban_projected_sd_rank \tab numeric \tab Rank of boban_projected_sd within the season and season type, ascending: 1 = the smallest sd (the most certain projection), ties averaged. Null when boban_projected_sd_n is under 1,600 or fewer than 10 players are ranked. \cr + o_rapm_rank \tab numeric \tab Rank of o_rapm within the season and season type, 1 = best, ties averaged. Null when o_rapm is null, o_rapm_n is under 610, or fewer than 10 players are ranked. \cr + d_rapm_rank \tab numeric \tab Rank of d_rapm within the season and season type, 1 = best, ties averaged. Null when d_rapm is null, d_rapm_n is under 1,200, or fewer than 10 players are ranked. \cr + rapm_rank \tab numeric \tab Rank of rapm within the season and season type, 1 = best, ties averaged. Null when rapm is null, rapm_n is under 1,600, or fewer than 10 players are ranked. \cr + o_adj_rapm_rank \tab numeric \tab Rank of o_adj_rapm within the season and season type, 1 = best, ties averaged. Null when o_adj_rapm is null, o_adj_rapm_n is under 610, or fewer than 10 players are ranked. \cr + d_adj_rapm_rank \tab numeric \tab Rank of d_adj_rapm within the season and season type, 1 = best, ties averaged. Null when d_adj_rapm is null, d_adj_rapm_n is under 1,200, or fewer than 10 players are ranked. \cr + adj_rapm_rank \tab numeric \tab Rank of adj_rapm within the season and season type, 1 = best, ties averaged. Null when adj_rapm is null, adj_rapm_n is under 1,600, or fewer than 10 players are ranked. \cr + ospm_rank \tab numeric \tab Rank of ospm within the season and season type, 1 = best, ties averaged. Null when ospm is null, ospm_n is under 610, or fewer than 10 players are ranked. \cr + dspm_rank \tab numeric \tab Rank of dspm within the season and season type, 1 = best, ties averaged. Null when dspm is null, dspm_n is under 1,200, or fewer than 10 players are ranked. \cr + spm_rank \tab numeric \tab Rank of spm within the season and season type, 1 = best, ties averaged. Null when spm is null, spm_n is under 1,600, or fewer than 10 players are ranked. \cr + obpm_rank \tab numeric \tab Rank of obpm within the season and season type, 1 = best, ties averaged. Null when obpm is null, obpm_n is under 610, or fewer than 10 players are ranked. \cr + dbpm_rank \tab numeric \tab Rank of dbpm within the season and season type, 1 = best, ties averaged. Null when dbpm is null, dbpm_n is under 1,200, or fewer than 10 players are ranked. \cr + bpm_rank \tab numeric \tab Rank of bpm within the season and season type, 1 = best, ties averaged. Null when bpm is null, bpm_n is under 1,600, or fewer than 10 players are ranked. \cr + war_rank \tab numeric \tab Rank of war within the season and season type, 1 = best, ties averaged. Ungated; null when war is null or fewer than 10 players are ranked. \cr + boban_filtered_skill_rank \tab numeric \tab Rank of boban_filtered_skill within the season and season type, 1 = best, ties averaged. Null when boban_filtered_skill is null, boban_filtered_skill_n is under 1,600, or fewer than 10 players are ranked. \cr + boban_projected_rating_rank \tab numeric \tab Rank of boban_projected_rating within the season and season type, 1 = best, ties averaged. Null when boban_projected_rating is null, boban_projected_rating_n is under 1,600, or fewer than 10 players are ranked. \cr + boban_projected_sd_rank \tab numeric \tab Rank of boban_projected_sd within the season and season type, ascending: 1 = the smallest sd (the most certain projection), ties averaged. Null when boban_projected_sd is null, boban_projected_sd_n is under 1,600, or fewer than 10 players are ranked. \cr o_rapm_pct \tab numeric \tab Percentile of o_rapm_rank, 100 x (n + 1 - rank) / (n + 1) over the n ranked players; null where the rank is. \cr d_rapm_pct \tab numeric \tab Percentile of d_rapm_rank, 100 x (n + 1 - rank) / (n + 1) over the n ranked players; null where the rank is. \cr rapm_pct \tab numeric \tab Percentile of rapm_rank, 100 x (n + 1 - rank) / (n + 1) over the n ranked players; null where the rank is. \cr @@ -140,7 +143,8 @@ are regular-season sized, so most playoff ranks are null. }} \if{latex}{See the HTML help or pkgdown reference for the column table.} -Returns a \code{wehoop_data} tibble with one row per player-team-season. +\code{load_wbb_player_value()} returns a \code{wehoop_data} tibble with one +row per player-team-season. \if{html}{\tabular{lll}{ col_name \tab types \tab description \cr @@ -152,11 +156,12 @@ Returns a \code{wehoop_data} tibble with one row per player-team-season. box_obpm \tab numeric \tab Box-score offensive box plus-minus. \cr box_dbpm \tab numeric \tab Box-score defensive box plus-minus. \cr box_bpm \tab numeric \tab Box-score net box plus-minus (box_obpm + box_dbpm). \cr - qualified \tab logical \tab TRUE when min is at least 300, the floor where the spread of box_bpm reaches its high-minute plateau. An additive flag: no row is dropped. \cr + qualified \tab logical \tab TRUE when min is at least 300, the floor where the spread of box_bpm first sits within 2% of its high-minute plateau. An additive flag: no row is dropped. \cr }} \if{latex}{See the HTML help or pkgdown reference for the column table.} -Returns a \code{wehoop_data} tibble with one row per team-season. +\code{load_wbb_ratings()} returns a \code{wehoop_data} tibble with one row per +team-season. \if{html}{\tabular{lll}{ col_name \tab types \tab description \cr @@ -169,13 +174,13 @@ Returns a \code{wehoop_data} tibble with one row per team-season. raw_o \tab numeric \tab Unadjusted (raw) offensive efficiency. \cr raw_d \tab numeric \tab Unadjusted (raw) defensive efficiency. \cr games \tab integer \tab Games played (season total). \cr - rank \tab integer \tab National rank by adj_em. \cr + rank \tab integer \tab Rank by adj_em among every team in the file (dense, 1 = best; includes non-Division I opponents). \cr adj_em_z \tab numeric \tab Z-score of adj_em relative to the season's team distribution. \cr - adj_o_blend \tab numeric \tab Adjusted offensive efficiency with the preseason prior blended in: the same fixed point as adj_o, with each Division I team shrunk toward last season's regressed rating as if it had played prior_games extra games at it. A team new to Division I (or with no rated game last season) is shrunk toward the 23rd percentile of last season's Division I adj_em instead. \cr + adj_o_blend \tab numeric \tab Adjusted offensive efficiency with the preseason prior blended in: the same fixed point as adj_o, with each Division I team shrunk toward last season's regressed rating as if it had played prior_games extra games at it. A team new to Division I (or with no rated game last season) is shrunk toward the 23rd percentile of last season's Division I adj_em instead. Non-Division I opponents get no prior; their values move only through their Division I opponents. \cr adj_d_blend \tab numeric \tab Adjusted defensive efficiency with the preseason prior blended in, on the same basis as adj_o_blend (lower is better). \cr adj_em_blend \tab numeric \tab adj_o_blend minus adj_d_blend. A team with g games is rated about g / (g + prior_games) on this season. \cr - rank_blend \tab integer \tab National rank by adj_em_blend (dense, 1 = best). \cr - prior_games \tab numeric \tab Weight of the preseason prior, in games (3 for women's). 0 when the previous season is not released; the blend then equals the unblended rating. \cr + rank_blend \tab integer \tab Rank by adj_em_blend among every team in the file (dense, 1 = best; includes non-Division I opponents). \cr + prior_games \tab numeric \tab Weight of the preseason prior, in games (3). 0 when the previous season has no ratable games (2009); the blend then equals the unblended rating. \cr }} \if{latex}{See the HTML help or pkgdown reference for the column table.} } diff --git a/vignettes/articles/womens-college-basketball-player-value-model.Rmd b/vignettes/articles/womens-college-basketball-player-value-model.Rmd index 45c72b0c4..188cea279 100644 --- a/vignettes/articles/womens-college-basketball-player-value-model.Rmd +++ b/vignettes/articles/womens-college-basketball-player-value-model.Rmd @@ -63,9 +63,6 @@ library(ggplot2) ```{r load} pv <- load_wbb_player_value(seasons = 2025:2026) -# Older release files predate the `qualified` flag; derive it the same way. -if (!"qualified" %in% names(pv)) pv$qualified <- pv$min >= 300 - pv |> count(season, qualified) ``` @@ -213,8 +210,7 @@ A correlation near zero means the two components are not restating each other. high-volume scorers. - **No shrinkage.** Low-minute values are unreliable; use the `qualified` flag. - **Team-anchored.** A player's BPM inherits her team's adjusted margin, so an - error in the team rating moves the whole roster. As reported in the cards, the - 2015 team ratings are missing, which leaves every 2015 player value empty. + error in the team rating moves the whole roster. - **Not yet blended with RAPM.** As reported in the card, a hybrid that uses BPM as a prior for RAPM is the planned next step. diff --git a/vignettes/articles/womens-college-basketball-team-ratings-model.Rmd b/vignettes/articles/womens-college-basketball-team-ratings-model.Rmd index 3035bb669..eca3a5e27 100644 --- a/vignettes/articles/womens-college-basketball-team-ratings-model.Rmd +++ b/vignettes/articles/womens-college-basketball-team-ratings-model.Rmd @@ -237,15 +237,14 @@ core |> As reported in the model card: -- **2015 is missing.** The published 2015 file has no usable ratings (the fixed - point did not converge on that season's inputs), which also leaves the 2015 - player value file empty. A repair and republish is pending. - **Older seasons are thin.** Seasons before about 2017 have fewer teams with a full schedule in the box scores, and seasons before 2013 sit on a different possession scale because of the older box score format. The 2008 file fails the level gate. Use pre-2017 ratings with care. -- **No preseason prior.** Early-season ratings start from a flat slate, so they - are noisy until teams have played enough games. +- **A light preseason prior.** The unblended `adj_*` and `rank` columns start + from a flat slate, so they are noisy until teams have played enough games. Use + `adj_*_blend` / `rank_blend` for early-season ratings: a 3-game prior toward + last season. - **Home court and travel.** Altitude and travel distance are not modelled. ## Where to go next From e0896e8cd6942cb2d15c152b08e968203fb35751 Mon Sep 17 00:00:00 2001 From: saiemgilani Date: Thu, 26 Nov 2026 13:09:57 -0500 Subject: [PATCH 4/5] docs(load_models): state the playoff and no-prior cases of the adj-RAPM prior Regular-season adj-RAPM is shrunk toward last season's SPM, playoff adj-RAPM toward the same season's regular-season SPM, and a player with no prior toward zero. Replace 'national rank' with the every-team-in-the-file scope, define the _blend columns in the team-ratings article, and note that the model card predates the preseason prior and the 2026-11-14 republish. --- NEWS.md | 11 ++++++----- R/load_models.R | 7 ++++--- man/load_wbb_player_value.Rd | 7 ++++--- vignettes/articles/wnba-player-impact-model.Rmd | 7 ++++--- ...omens-college-basketball-team-ratings-model.Rmd | 14 +++++++++----- 5 files changed, 27 insertions(+), 19 deletions(-) diff --git a/NEWS.md b/NEWS.md index ef209c999..0303896b4 100644 --- a/NEWS.md +++ b/NEWS.md @@ -486,13 +486,14 @@ the `httr2` and `testthat` floors (see Dependencies). (#84) is better). The docs now say so. * The returns tables of the three model loaders now list every column of the published files: `load_wnba_player_impact()` 76 (was 28; adds the `_n`, `_rank` and `_pct` columns of each - of the 16 ratings), `load_wbb_ratings()` 16 (was 11; adds `adj_o_blend`, `adj_d_blend`, `adj_em_blend`, - `rank_blend` and `prior_games`) and `load_wbb_player_value()` 9 (was 8; adds `qualified`). - `o_adj_rapm` / `d_adj_rapm` were documented as adjusted for minutes/possession stability; they - are RAPM fitted with a ridge prior toward the previous season's SPM. The team-ratings and + of the 16 ratings), `load_wbb_ratings()` 16 (was 11; adds `adj_o_blend`, `adj_d_blend`, + `adj_em_blend`, `rank_blend` and `prior_games`) and `load_wbb_player_value()` 9 (was 8; adds + `qualified`). `o_adj_rapm` / `d_adj_rapm` were documented as adjusted for minutes/possession + stability; they are RAPM with a ridge prior toward SPM (last season's in the regular season, + this season's regular-season SPM in the playoffs). `load_wbb_player_value()` documented + `player_id` as a stats.ncaa.org id; it is the ESPN athlete id. The team-ratings and player-value articles no longer say 2015 is missing, that there is no preseason prior, or that older files lack `qualified`. - `load_wbb_player_value()` documented `player_id` as a stats.ncaa.org id; it is the ESPN athlete id. * The installed help is a third smaller (4.4 MB to 3.0 MB). The help pages of the 9 largest function families (ESPN WNBA and WBB, WNBA Player and Team, FIBA, TBF, SCB, NBL Rosetta, WJBL) link to one family index page (`?family_espn_wnba`, `?family_tbf`, ...) in "See also" diff --git a/R/load_models.R b/R/load_models.R index a73d9b1f0..2bf4b2294 100644 --- a/R/load_models.R +++ b/R/load_models.R @@ -52,8 +52,8 @@ #' rapm \tab numeric \tab Net regularized adjusted plus-minus (o_rapm + d_rapm). \cr #' off_poss \tab integer \tab Offensive possessions used in the RAPM fit. \cr #' def_poss \tab integer \tab Defensive possessions used in the RAPM fit. \cr -#' o_adj_rapm \tab numeric \tab Offensive RAPM fitted with a ridge prior toward the previous season's SPM (instead of shrinking to zero). \cr -#' d_adj_rapm \tab numeric \tab Defensive RAPM fitted with a ridge prior toward the previous season's SPM (instead of shrinking to zero). \cr +#' o_adj_rapm \tab numeric \tab Offensive RAPM fitted with a ridge prior toward SPM instead of zero: the previous season's SPM in the regular season, the same season's regular-season SPM in the playoffs. A player with no prior (a first season, or after a gap) is shrunk toward zero. \cr +#' d_adj_rapm \tab numeric \tab Defensive RAPM fitted with a ridge prior toward SPM instead of zero: the previous season's SPM in the regular season, the same season's regular-season SPM in the playoffs. A player with no prior (a first season, or after a gap) is shrunk toward zero. \cr #' adj_rapm \tab numeric \tab Net adjusted RAPM (o_adj_rapm + d_adj_rapm). \cr #' ospm \tab numeric \tab Offensive statistical plus-minus (box-score component). \cr #' dspm \tab numeric \tab Defensive statistical plus-minus (box-score component). \cr @@ -244,7 +244,8 @@ load_wbb_player_value <- function(seasons = most_recent_wbb_season(), #' @description Loads season-level NCAA women's college basketball team #' ratings -- one row per team-season, with adjusted #' (opponent-strength-normalized) offensive/defensive efficiency, adjusted -#' tempo, raw efficiency, and a national rank, solved as an iterative fixed +#' tempo, raw efficiency, and a rank by adj_em over every team in the file +#' (including non-Division I opponents), solved as an iterative fixed #' point. This tag is parquet-only, with no #' csv/rds sibling assets. Produced by the sportsdataverse-py NCAA WBB model program; #' published to the `wbb_ratings` release tag. diff --git a/man/load_wbb_player_value.Rd b/man/load_wbb_player_value.Rd index 54a6cbb1d..13c454cbf 100644 --- a/man/load_wbb_player_value.Rd +++ b/man/load_wbb_player_value.Rd @@ -77,8 +77,8 @@ null except \code{war_rank} and \code{war_pct}. rapm \tab numeric \tab Net regularized adjusted plus-minus (o_rapm + d_rapm). \cr off_poss \tab integer \tab Offensive possessions used in the RAPM fit. \cr def_poss \tab integer \tab Defensive possessions used in the RAPM fit. \cr - o_adj_rapm \tab numeric \tab Offensive RAPM fitted with a ridge prior toward the previous season's SPM (instead of shrinking to zero). \cr - d_adj_rapm \tab numeric \tab Defensive RAPM fitted with a ridge prior toward the previous season's SPM (instead of shrinking to zero). \cr + o_adj_rapm \tab numeric \tab Offensive RAPM fitted with a ridge prior toward SPM instead of zero: the previous season's SPM in the regular season, the same season's regular-season SPM in the playoffs. A player with no prior (a first season, or after a gap) is shrunk toward zero. \cr + d_adj_rapm \tab numeric \tab Defensive RAPM fitted with a ridge prior toward SPM instead of zero: the previous season's SPM in the regular season, the same season's regular-season SPM in the playoffs. A player with no prior (a first season, or after a gap) is shrunk toward zero. \cr adj_rapm \tab numeric \tab Net adjusted RAPM (o_adj_rapm + d_adj_rapm). \cr ospm \tab numeric \tab Offensive statistical plus-minus (box-score component). \cr dspm \tab numeric \tab Defensive statistical plus-minus (box-score component). \cr @@ -203,7 +203,8 @@ published to the \code{wbb_player_value} release tag. Loads season-level NCAA women's college basketball team ratings -- one row per team-season, with adjusted (opponent-strength-normalized) offensive/defensive efficiency, adjusted -tempo, raw efficiency, and a national rank, solved as an iterative fixed +tempo, raw efficiency, and a rank by adj_em over every team in the file +(including non-Division I opponents), solved as an iterative fixed point. This tag is parquet-only, with no csv/rds sibling assets. Produced by the sportsdataverse-py NCAA WBB model program; published to the \code{wbb_ratings} release tag. diff --git a/vignettes/articles/wnba-player-impact-model.Rmd b/vignettes/articles/wnba-player-impact-model.Rmd index 16db85393..05e858241 100644 --- a/vignettes/articles/wnba-player-impact-model.Rmd +++ b/vignettes/articles/wnba-player-impact-model.Rmd @@ -42,7 +42,7 @@ average player, split into offense and defense, except WAR, which counts wins. | Engine | Columns | What it measures | |---|---|---| | RAPM | `o_rapm`, `d_rapm`, `rapm` | Regularized adjusted plus-minus: a ridge regression of possession outcomes on the ten players on the court | -| adj-RAPM | `o_adj_rapm`, `d_adj_rapm`, `adj_rapm` | RAPM with a prior from the previous season's SPM, instead of shrinking every player to zero | +| adj-RAPM | `o_adj_rapm`, `d_adj_rapm`, `adj_rapm` | RAPM with a prior from SPM instead of zero: last season's in the regular season, this season's regular-season SPM in the playoffs | | SPM | `ospm`, `dspm`, `spm` | Statistical plus-minus: box score rates weighted by coefficients fitted to regular-season RAPM | | BPM | `obpm`, `dbpm`, `bpm` | Box plus-minus (BPM 2.0 design) from box score logs and listed positions | | WAR | `war` | Wins above replacement: the RAPM rating times a calibrated points-per-win, with replacement level at -2.0 | @@ -113,8 +113,9 @@ in time. roughly 15-game sample would train noise on noise. The fitted coefficients ship beside the release as `wnba_player_impact_spm_coefficients.json`. 4. **adj-RAPM.** RAPM again, but each player is shrunk toward her previous - season's SPM rather than toward zero. A gap season deliberately breaks the - prior chain. + season's SPM rather than toward zero (in the playoffs, toward that season's + regular-season SPM). A player with no prior is still shrunk toward zero, and + a gap season deliberately breaks the prior chain. 5. **BPM.** A box plus-minus from box score logs and listed positions. 6. **DARKO-style filter.** A per-season Kalman update over the RAPM panel with an aging curve. Playoff form enters as a possession-weighted blend rather diff --git a/vignettes/articles/womens-college-basketball-team-ratings-model.Rmd b/vignettes/articles/womens-college-basketball-team-ratings-model.Rmd index eca3a5e27..e21ac0983 100644 --- a/vignettes/articles/womens-college-basketball-team-ratings-model.Rmd +++ b/vignettes/articles/womens-college-basketball-team-ratings-model.Rmd @@ -42,7 +42,8 @@ numbers quoted from that card are labelled as such. | `adj_em_z` | `adj_em` as a z-score within the season | | `adj_tempo` | Adjusted possessions per 40 minutes | | `raw_o`, `raw_d` | Unadjusted points scored and allowed per 100 possessions | -| `games`, `rank` | Games in the fit and national rank by `adj_em` | +| `games`, `rank` | Games in the fit and a rank by `adj_em` over every team in the file (including non-Division I opponents) | +| `adj_o_blend`, `adj_d_blend`, `adj_em_blend`, `rank_blend`, `prior_games` | The same ratings with a `prior_games`-game preseason prior toward last season (3; 0 in 2009) | The design is the same family as the KenPom and Bart Torvik ratings that are standard in college basketball analysis. @@ -235,16 +236,19 @@ core |> ## Limitations and known issues -As reported in the model card: +As reported in the model card, updated for the current release files (the card +predates the preseason prior and the 2026-11-14 republish that fixed the 2015 +files): - **Older seasons are thin.** Seasons before about 2017 have fewer teams with a full schedule in the box scores, and seasons before 2013 sit on a different - possession scale because of the older box score format. The 2008 file fails the - level gate. Use pre-2017 ratings with care. + possession scale because of the older box score format. A 2008 season was + computed but refused by the level gate, so the files start in 2009. Use + pre-2017 ratings with care. - **A light preseason prior.** The unblended `adj_*` and `rank` columns start from a flat slate, so they are noisy until teams have played enough games. Use `adj_*_blend` / `rank_blend` for early-season ratings: a 3-game prior toward - last season. + last season (none in 2009, the first season). - **Home court and travel.** Altitude and travel distance are not modelled. ## Where to go next From 0cb166e3d8fa6a4c3142fdbd903b0ab023639b69 Mon Sep 17 00:00:00 2001 From: saiemgilani Date: Thu, 26 Nov 2026 13:25:35 -0500 Subject: [PATCH 5/5] docs(load_models): key load_wnba_player_impact() rows by season type The files carry separate Regular Season and Playoffs rows; the unique key is player, team, season and season type. The player-impact article notes that the linked model card omits the playoff case of the adj-RAPM prior. --- R/load_models.R | 5 +++-- man/load_wbb_player_value.Rd | 5 +++-- vignettes/articles/wnba-player-impact-model.Rmd | 4 +++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/R/load_models.R b/R/load_models.R index 2bf4b2294..fb33a7783 100644 --- a/R/load_models.R +++ b/R/load_models.R @@ -10,7 +10,7 @@ #' @rdname load_wbb_player_value #' @author Saiem Gilani #' @description Loads season-level WNBA player-impact ratings -- one row per -#' player-team-season, combining regularized adjusted plus-minus (RAPM), +#' player, team, season and season type, combining regularized adjusted plus-minus (RAPM), #' statistical plus-minus (SPM), box plus-minus (BPM), wins above #' replacement (WAR), and a DARKO-style skill/projection pair. Produced by #' the sportsdataverse-py NBA/WNBA possession-engine model program; published to the @@ -30,7 +30,8 @@ #' @param dbConnection A `DBIConnection` object, as returned by [DBI::dbConnect()] #' @param tablename The name of the data table within the database #' @return `load_wnba_player_impact()` returns a `wehoop_data` tibble with one -#' row per player-team-season. +#' row per player, team, season and season type (`Regular Season` and +#' `Playoffs` rows are separate). #' Each of the 16 ratings gets an `_n` (sample size), `_rank` and `_pct` #' column, computed within each season and season type. The sample gates #' are regular-season sized: in the published 1997-2026 files no season has diff --git a/man/load_wbb_player_value.Rd b/man/load_wbb_player_value.Rd index 13c454cbf..b974ff893 100644 --- a/man/load_wbb_player_value.Rd +++ b/man/load_wbb_player_value.Rd @@ -55,7 +55,8 @@ the season data into a database.} } \value{ \code{load_wnba_player_impact()} returns a \code{wehoop_data} tibble with one -row per player-team-season. +row per player, team, season and season type (\verb{Regular Season} and +\code{Playoffs} rows are separate). Each of the 16 ratings gets an \verb{_n} (sample size), \verb{_rank} and \verb{_pct} column, computed within each season and season type. The sample gates are regular-season sized: in the published 1997-2026 files no season has @@ -186,7 +187,7 @@ team-season. } \description{ Loads season-level WNBA player-impact ratings -- one row per -player-team-season, combining regularized adjusted plus-minus (RAPM), +player, team, season and season type, combining regularized adjusted plus-minus (RAPM), statistical plus-minus (SPM), box plus-minus (BPM), wins above replacement (WAR), and a DARKO-style skill/projection pair. Produced by the sportsdataverse-py NBA/WNBA possession-engine model program; published to the diff --git a/vignettes/articles/wnba-player-impact-model.Rmd b/vignettes/articles/wnba-player-impact-model.Rmd index 05e858241..7c15e29d7 100644 --- a/vignettes/articles/wnba-player-impact-model.Rmd +++ b/vignettes/articles/wnba-player-impact-model.Rmd @@ -32,7 +32,9 @@ This article explains what each engine estimates, how the suite is built, how well it holds up out of sample, and where it is weakest. It condenses the official model card in the [wehoop-wnba-stats-data repository](https://github.com/sportsdataverse/wehoop-wnba-stats-data/blob/main/docs/models/player_impact.md); -numbers quoted from that card are labelled as such. +numbers quoted from that card are labelled as such. The card gives the adj-RAPM +prior as the previous season's SPM only; it omits the playoff case, where playoff +rows use the same season's regular-season SPM. ## What the model estimates