WNBA — additional Python functions — Analytics: wnba_game–wnba_player
wnba_game_units
wnba_game_units(seasons: 'int | list[int]', *, league_id: 'str' = '10', return_as_pandas: 'bool' = False) -> 'pl.DataFrame | pd.DataFrame'
WNBA in-game units (league_id='10'). See sportsdataverse.nba.nba_game_stints.nba_game_units.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
seasons | int | list[int] | ||
league_id | str | '10' | |
return_as_pandas | bool | False |
Returns
One row per (season, game_id, team_id, n_players, lineup_id): opp_team_id, n_players (1 to 5), lineup_id (the player ids sorted and joined with -), player_1..5, minutes / seconds, poss / opp_poss, pts / opp_pts, plus_minus, off_rtg / def_rtg / net_rtg (per 100 possessions), the four factors for (efg_pct, tov_pct, orb_pct, ft_rate) and against (opp_*), the shot zones for and against (rim_rate, mid_rate, fg3_rate shares of field-goal attempts, rim_pct, mid_pct, fg3_pct make rates, opp_*) as fractions, and every rate's <m>_n. Empty input returns that schema with zero rows.
| col_name | type | description |
|---|---|---|
season | Int64 | Season, named by the year it ends (the WNBA season is its calendar year). |
game_id | String | stats.nba.com game id (e.g. 0022500101). |
team_id | Int64 | stats.nba.com team id. |
opp_team_id | Int64 | The opponent's team id. |
n_players | Int64 | Unit size: 1 to 5 players. |
lineup_id | String | The unit's player ids, sorted and joined with '-'. |
player_1 | Int64 | Player 1 of the unit, in lineup_id order; null past n_players. |
player_2 | Int64 | Player 2 of the unit, in lineup_id order; null past n_players. |
player_3 | Int64 | Player 3 of the unit, in lineup_id order; null past n_players. |
player_4 | Int64 | Player 4 of the unit, in lineup_id order; null past n_players. |
player_5 | Int64 | Player 5 of the unit, in lineup_id order; null past n_players. |
minutes | Float64 | Game-clock minutes the unit's players were all on the floor together (seconds / 60). |
seconds | Float64 | Game-clock seconds the unit's players were all on the floor together. |
poss | Int64 | Offensive possessions with the unit on the floor (a possession counts for the five on the floor when it starts). |
opp_poss | Int64 | Defensive possessions with the unit on the floor, counted as poss is. |
pts | Int64 | The team's points with the unit on the floor, each scoring action credited to the lineup at that action (a free throw to the lineup at the last foul). |
opp_pts | Int64 | The opponent's points with the unit on the floor, credited as pts is. |
plus_minus | Int64 | The unit's +/- in the game: pts - opp_pts. |
off_rtg | Float64 | Offensive rating: pts per 100 poss. Null with a zero denominator. |
def_rtg | Float64 | Defensive rating: opp_pts per 100 opp_poss. Null with a zero denominator. |
net_rtg | Float64 | Net rating: off_rtg - def_rtg; null when either is null. |
efg_pct | Float64 | Effective field-goal percentage, (FGM + 0.5 * 3PM) / FGA, as a fraction. Null with a zero denominator. |
tov_pct | Float64 | Turnovers per offensive possession, as a fraction. Null with a zero denominator. |
orb_pct | Float64 | Offensive-rebound rate: own offensive rebounds over own offensive rebounds plus the opponent's defensive rebounds. Null with a zero denominator. |
ft_rate | Float64 | Free-throw rate: FTA / FGA. Null with a zero denominator. |
opp_efg_pct | Float64 | The opponent's effective field-goal percentage with the unit on the floor. Null with a zero denominator. |
opp_tov_pct | Float64 | The opponent's turnovers per defensive possession, as a fraction. Null with a zero denominator. |
opp_orb_pct | Float64 | The opponent's offensive-rebound rate with the unit on the floor. Null with a zero denominator. |
opp_ft_rate | Float64 | The opponent's free-throw rate: FTA / FGA. Null with a zero denominator. |
rim_rate | Float64 | Share of the unit's field-goal attempts at the rim (a two under 4 feet). Null with a zero denominator. |
mid_rate | Float64 | Share of the unit's field-goal attempts that are other twos (mid-range). Null with a zero denominator. |
fg3_rate | Float64 | Share of the unit's field-goal attempts that are threes. Null with a zero denominator. |
rim_pct | Float64 | Field-goal percentage at the rim, as a fraction. Null with a zero denominator. |
mid_pct | Float64 | Mid-range field-goal percentage, as a fraction. Null with a zero denominator. |
fg3_pct | Float64 | Three-point percentage, as a fraction. Null with a zero denominator. |
opp_rim_rate | Float64 | Share of the opponent's field-goal attempts at the rim with the unit on the floor. Null with a zero denominator. |
opp_mid_rate | Float64 | Share of the opponent's field-goal attempts that are mid-range twos. Null with a zero denominator. |
opp_fg3_rate | Float64 | Share of the opponent's field-goal attempts that are threes. Null with a zero denominator. |
opp_rim_pct | Float64 | The opponent's field-goal percentage at the rim. Null with a zero denominator. |
opp_mid_pct | Float64 | The opponent's mid-range field-goal percentage with the unit on the floor. Null with a zero denominator. |
opp_fg3_pct | Float64 | The opponent's three-point percentage with the unit on the floor. Null with a zero denominator. |
off_rtg_n | Int64 | Sample size of off_rtg: poss. |
def_rtg_n | Int64 | Sample size of def_rtg: opp_poss. |
net_rtg_n | Int64 | Sample size of net_rtg: poss + opp_poss. |
efg_pct_n | Int64 | Sample size of efg_pct: the unit's field-goal attempts. |
tov_pct_n | Int64 | Sample size of tov_pct: poss. |
orb_pct_n | Int64 | Sample size of orb_pct: the unit's offensive-rebound chances. |
ft_rate_n | Int64 | Sample size of ft_rate: the unit's field-goal attempts. |
opp_efg_pct_n | Int64 | Sample size of opp_efg_pct: the opponent's field-goal attempts. |
opp_tov_pct_n | Int64 | Sample size of opp_tov_pct: opp_poss. |
opp_orb_pct_n | Int64 | Sample size of opp_orb_pct: the opponent's offensive-rebound chances. |
opp_ft_rate_n | Int64 | Sample size of opp_ft_rate: the opponent's field-goal attempts. |
rim_rate_n | Int64 | Sample size of rim_rate: the unit's field-goal attempts. |
mid_rate_n | Int64 | Sample size of mid_rate: the unit's field-goal attempts. |
fg3_rate_n | Int64 | Sample size of fg3_rate: the unit's field-goal attempts. |
rim_pct_n | Int64 | Sample size of rim_pct: the unit's rim attempts. |
mid_pct_n | Int64 | Sample size of mid_pct: the unit's mid-range attempts. |
fg3_pct_n | Int64 | Sample size of fg3_pct: the unit's three-point attempts. |
opp_rim_rate_n | Int64 | Sample size of opp_rim_rate: the opponent's field-goal attempts. |
opp_mid_rate_n | Int64 | Sample size of opp_mid_rate: the opponent's field-goal attempts. |
opp_fg3_rate_n | Int64 | Sample size of opp_fg3_rate: the opponent's field-goal attempts. |
opp_rim_pct_n | Int64 | Sample size of opp_rim_pct: the opponent's rim attempts. |
opp_mid_pct_n | Int64 | Sample size of opp_mid_pct: the opponent's mid-range attempts. |
opp_fg3_pct_n | Int64 | Sample size of opp_fg3_pct: the opponent's three-point attempts. |
wnba_lineup_seasons
wnba_lineup_seasons(seasons: 'int | list[int]', *, league_id: 'str' = '10', season_type: 'str' = 'regular-season', min_poss: 'int | None' = None, return_as_pandas: 'bool' = False) -> 'pl.DataFrame | pd.DataFrame'
WNBA lineup seasons (league_id='10'). See sportsdataverse.nba.nba_lineup_seasons.nba_lineup_seasons.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
seasons | int | list[int] | ||
league_id | str | '10' | |
season_type | str | 'regular-season' | |
min_poss | int | None | None | |
return_as_pandas | bool | False |
Returns
One row per (season, team_id, n_players, lineup_id): n_players (2, 3 or 5), lineup_id (the player ids sorted and joined with -), player_1..5, minutes, poss / opp_poss, pts / opp_pts, plus_minus, off_rtg / def_rtg / net_rtg (per 100 possessions), the four factors for (efg_pct, tov_pct, orb_pct, ft_rate) and against (opp_*) as fractions, and for every rate <m>_rank / <m>_pct (within the season and unit size, among units with at least min_poss) and <m>_n. Ids are the stats.nba.com ids (Int64). Empty input returns that schema with zero rows.
| col_name | type | description |
|---|---|---|
season | Int64 | Season, named by the year it ends (the WNBA season is its calendar year). |
team_id | Int64 | stats.nba.com team id. |
n_players | Int64 | Unit size: 2, 3 or 5 players. |
lineup_id | String | The unit's stats.nba.com player ids, sorted numerically and joined with '-'. |
player_1 | Int64 | Player 1 of the unit, in lineup_id order; null past n_players. |
player_2 | Int64 | Player 2 of the unit, in lineup_id order; null past n_players. |
player_3 | Int64 | Player 3 of the unit, in lineup_id order; null past n_players. |
player_4 | Int64 | Player 4 of the unit, in lineup_id order; null past n_players. |
player_5 | Int64 | Player 5 of the unit, in lineup_id order; null past n_players. |
minutes | Float64 | Game-clock minutes the unit shared the floor over the season. |
poss | Int64 | Offensive possessions with the unit on the floor (a possession counts for the five on the floor when it starts; a 2- or 3-man unit sums the fives that contain it). |
opp_poss | Int64 | Defensive possessions with the unit on the floor, counted as poss is. |
pts | Int64 | The team's points with the unit on the floor, each scoring action credited to the lineup at that action (a free throw to the lineup at the last foul). |
opp_pts | Int64 | The opponent's points with the unit on the floor, credited as pts is. |
plus_minus | Int64 | The unit's +/- over the season: pts - opp_pts. |
off_rtg | Float64 | Offensive rating: pts per 100 poss. Null with a zero denominator. |
def_rtg | Float64 | Defensive rating: opp_pts per 100 opp_poss. Null with a zero denominator. |
net_rtg | Float64 | Net rating: off_rtg - def_rtg; null when either is null. |
efg_pct | Float64 | Effective field-goal percentage, (FGM + 0.5 * 3PM) / FGA, as a fraction. Null with a zero denominator. Each possession's shots, free throws, rebounds and turnovers count for the lineup that started it, even after a substitution inside it. |
tov_pct | Float64 | Turnovers per offensive possession, as a fraction. Null with a zero denominator. Each possession's shots, free throws, rebounds and turnovers count for the lineup that started it, even after a substitution inside it. |
orb_pct | Float64 | Offensive-rebound rate: OREB / (OREB + the opponent's DREB), as a fraction. Null with a zero denominator. Each possession's shots, free throws, rebounds and turnovers count for the lineup that started it, even after a substitution inside it. |
ft_rate | Float64 | Free-throw rate: FTA / FGA. Null with a zero denominator. Each possession's shots, free throws, rebounds and turnovers count for the lineup that started it, even after a substitution inside it. |
opp_efg_pct | Float64 | The opponent's effective field-goal percentage with the unit on the floor. Null with a zero denominator. Each possession's shots, free throws, rebounds and turnovers count for the lineup that started it, even after a substitution inside it. |
opp_tov_pct | Float64 | The opponent's turnovers per defensive possession. Null with a zero denominator. Each possession's shots, free throws, rebounds and turnovers count for the lineup that started it, even after a substitution inside it. |
opp_orb_pct | Float64 | The opponent's offensive-rebound rate: its OREB / (its OREB + the unit's DREB). Null with a zero denominator. Each possession's shots, free throws, rebounds and turnovers count for the lineup that started it, even after a substitution inside it. |
opp_ft_rate | Float64 | The opponent's free-throw rate: FTA / FGA. Null with a zero denominator. Each possession's shots, free throws, rebounds and turnovers count for the lineup that started it, even after a substitution inside it. |
off_rtg_rank | Float64 | Rank of off_rtg within the season and unit size, league-wide (the highest value ranks 1; ties average), among units with at least min_poss possessions (poss + opp_poss; default 400 with league_id '00' (NBA), 200 with league_id '10' (WNBA)), whose off_rtg_n is at least 660 offensive possessions (the sample at which the rate was, on the fit seasons, half signal, rate_gates); null for a non-qualifier, a sample under that gate or a null rate, and for every unit of the group when fewer than ten qualifying units have a finite value of this rate or they all share one value. |
def_rtg_rank | Float64 | Rank of def_rtg within the season and unit size, league-wide (the lowest value ranks 1; ties average), among units with at least min_poss possessions (poss + opp_poss; default 400 with league_id '00' (NBA), 200 with league_id '10' (WNBA)), whose def_rtg_n is at least 810 defensive possessions (the sample at which the rate was, on the fit seasons, half signal, rate_gates); null for a non-qualifier, a sample under that gate or a null rate, and for every unit of the group when fewer than ten qualifying units have a finite value of this rate or they all share one value. |
net_rtg_rank | Float64 | Rank of net_rtg within the season and unit size, league-wide (the highest value ranks 1; ties average), among units with at least min_poss possessions (poss + opp_poss; default 400 with league_id '00' (NBA), 200 with league_id '10' (WNBA)), whose net_rtg_n is at least 840 possessions (offense plus defense) (the sample at which the rate was, on the fit seasons, half signal, rate_gates); null for a non-qualifier, a sample under that gate or a null rate, and for every unit of the group when fewer than ten qualifying units have a finite value of this rate or they all share one value. |
efg_pct_rank | Float64 | Rank of efg_pct within the season and unit size, league-wide (the highest value ranks 1; ties average), among units with at least min_poss possessions (poss + opp_poss; default 400 with league_id '00' (NBA), 200 with league_id '10' (WNBA)), whose efg_pct_n is at least 750 field-goal attempts (the sample at which the rate was, on the fit seasons, half signal, rate_gates); null for a non-qualifier, a sample under that gate or a null rate, and for every unit of the group when fewer than ten qualifying units have a finite value of this rate or they all share one value. |
tov_pct_rank | Float64 | Rank of tov_pct within the season and unit size, league-wide (the lowest value ranks 1; ties average), among units with at least min_poss possessions (poss + opp_poss; default 400 with league_id '00' (NBA), 200 with league_id '10' (WNBA)), whose tov_pct_n is at least 1,100 offensive possessions (the sample at which the rate was, on the fit seasons, half signal, rate_gates); null for a non-qualifier, a sample under that gate or a null rate, and for every unit of the group when fewer than ten qualifying units have a finite value of this rate or they all share one value. |
orb_pct_rank | Float64 | Rank of orb_pct within the season and unit size, league-wide (the highest value ranks 1; ties average), among units with at least min_poss possessions (poss + opp_poss; default 400 with league_id '00' (NBA), 200 with league_id '10' (WNBA)), whose orb_pct_n is at least 220 offensive-rebound chances (the sample at which the rate was, on the fit seasons, half signal, rate_gates); null for a non-qualifier, a sample under that gate or a null rate, and for every unit of the group when fewer than ten qualifying units have a finite value of this rate or they all share one value. |
ft_rate_rank | Float64 | Rank of ft_rate within the season and unit size, league-wide (the highest value ranks 1; ties average), among units with at least min_poss possessions (poss + opp_poss; default 400 with league_id '00' (NBA), 200 with league_id '10' (WNBA)), whose ft_rate_n is at least 720 field-goal attempts (the sample at which the rate was, on the fit seasons, half signal, rate_gates); null for a non-qualifier, a sample under that gate or a null rate, and for every unit of the group when fewer than ten qualifying units have a finite value of this rate or they all share one value. |
opp_efg_pct_rank | Float64 | Rank of opp_efg_pct within the season and unit size, league-wide (the lowest value ranks 1; ties average), among units with at least min_poss possessions (poss + opp_poss; default 400 with league_id '00' (NBA), 200 with league_id '10' (WNBA)), whose opp_efg_pct_n is at least 1,300 opponent field-goal attempts (the sample at which the rate was, on the fit seasons, half signal, rate_gates); null for a non-qualifier, a sample under that gate or a null rate, and for every unit of the group when fewer than ten qualifying units have a finite value of this rate or they all share one value. |
opp_tov_pct_rank | Float64 | Rank of opp_tov_pct within the season and unit size, league-wide (the highest value ranks 1; ties average), among units with at least min_poss possessions (poss + opp_poss; default 400 with league_id '00' (NBA), 200 with league_id '10' (WNBA)), whose opp_tov_pct_n is at least 350 defensive possessions (the sample at which the rate was, on the fit seasons, half signal, rate_gates); null for a non-qualifier, a sample under that gate or a null rate, and for every unit of the group when fewer than ten qualifying units have a finite value of this rate or they all share one value. |
opp_orb_pct_rank | Float64 | Rank of opp_orb_pct within the season and unit size, league-wide (the lowest value ranks 1; ties average), among units with at least min_poss possessions (poss + opp_poss; default 400 with league_id '00' (NBA), 200 with league_id '10' (WNBA)), whose opp_orb_pct_n is at least 860 opponent offensive-rebound chances (the sample at which the rate is half signal, rate_gates); null for a non-qualifier, a sample under that gate or a null rate, and for every unit of the group when fewer than ten qualifying units have a finite value of this rate or they all share one value. |
opp_ft_rate_rank | Float64 | Rank of opp_ft_rate within the season and unit size, league-wide (the lowest value ranks 1; ties average), among units with at least min_poss possessions (poss + opp_poss; default 400 with league_id '00' (NBA), 200 with league_id '10' (WNBA)), whose opp_ft_rate_n is at least 880 opponent field-goal attempts (the sample at which the rate was, on the fit seasons, half signal, rate_gates); null for a non-qualifier, a sample under that gate or a null rate, and for every unit of the group when fewer than ten qualifying units have a finite value of this rate or they all share one value. |
off_rtg_pct | Float64 | Percentile of off_rtg among the same qualified units: 100 * (n + 1 - rank) / (n + 1), n the number ranked; null when the rank is null. |
def_rtg_pct | Float64 | Percentile of def_rtg among the same qualified units: 100 * (n + 1 - rank) / (n + 1), n the number ranked; null when the rank is null. |
net_rtg_pct | Float64 | Percentile of net_rtg among the same qualified units: 100 * (n + 1 - rank) / (n + 1), n the number ranked; null when the rank is null. |
efg_pct_pct | Float64 | Percentile of efg_pct among the same qualified units: 100 * (n + 1 - rank) / (n + 1), n the number ranked; null when the rank is null. |
tov_pct_pct | Float64 | Percentile of tov_pct among the same qualified units: 100 * (n + 1 - rank) / (n + 1), n the number ranked; null when the rank is null. |
orb_pct_pct | Float64 | Percentile of orb_pct among the same qualified units: 100 * (n + 1 - rank) / (n + 1), n the number ranked; null when the rank is null. |
ft_rate_pct | Float64 | Percentile of ft_rate among the same qualified units: 100 * (n + 1 - rank) / (n + 1), n the number ranked; null when the rank is null. |
opp_efg_pct_pct | Float64 | Percentile of opp_efg_pct among the same qualified units: 100 * (n + 1 - rank) / (n + 1), n the number ranked; null when the rank is null. |
opp_tov_pct_pct | Float64 | Percentile of opp_tov_pct among the same qualified units: 100 * (n + 1 - rank) / (n + 1), n the number ranked; null when the rank is null. |
opp_orb_pct_pct | Float64 | Percentile of opp_orb_pct among the same qualified units: 100 * (n + 1 - rank) / (n + 1), n the number ranked; null when the rank is null. |
opp_ft_rate_pct | Float64 | Percentile of opp_ft_rate among the same qualified units: 100 * (n + 1 - rank) / (n + 1), n the number ranked; null when the rank is null. |
off_rtg_n | Int64 | Sample size of off_rtg: poss. |
def_rtg_n | Int64 | Sample size of def_rtg: opp_poss. |
net_rtg_n | Int64 | Sample size of net_rtg: poss + opp_poss. |
efg_pct_n | Int64 | Sample size of efg_pct: the unit's field-goal attempts. |
tov_pct_n | Int64 | Sample size of tov_pct: poss. |
orb_pct_n | Int64 | Sample size of orb_pct: the unit's offensive-rebound chances. |
ft_rate_n | Int64 | Sample size of ft_rate: the unit's field-goal attempts. |
opp_efg_pct_n | Int64 | Sample size of opp_efg_pct: the opponent's field-goal attempts. |
opp_tov_pct_n | Int64 | Sample size of opp_tov_pct: opp_poss. |
opp_orb_pct_n | Int64 | Sample size of opp_orb_pct: the opponent's offensive-rebound chances. |
opp_ft_rate_n | Int64 | Sample size of opp_ft_rate: the opponent's field-goal attempts. |
pts_per75 | Float64 | Per 75 possessions: 0.75 * off_rtg (BB-G8's per-75 basis). A unit has no per-game basis: it plays stretches of many games, never a game of its own. |
opp_pts_per75 | Float64 | Per 75 possessions: 0.75 * def_rtg (BB-G8's per-75 basis). A unit has no per-game basis: it plays stretches of many games, never a game of its own. |
plus_minus_per75 | Float64 | Per 75 possessions: 0.75 * net_rtg (BB-G8's per-75 basis). A unit has no per-game basis: it plays stretches of many games, never a game of its own. |
pts_per75_rank | Float64 | Rank of pts_per75: off_rtg_rank, copied (scaling by 0.75 keeps the order: same gate, same ties). |
opp_pts_per75_rank | Float64 | Rank of opp_pts_per75: def_rtg_rank, copied (scaling by 0.75 keeps the order: same gate, same ties). |
plus_minus_per75_rank | Float64 | Rank of plus_minus_per75: net_rtg_rank, copied (scaling by 0.75 keeps the order: same gate, same ties). |
pts_per75_pct | Float64 | Percentile of pts_per75: off_rtg_pct, copied (scaling by 0.75 keeps the order). |
opp_pts_per75_pct | Float64 | Percentile of opp_pts_per75: def_rtg_pct, copied (scaling by 0.75 keeps the order). |
plus_minus_per75_pct | Float64 | Percentile of plus_minus_per75: net_rtg_pct, copied (scaling by 0.75 keeps the order). |
pts_per75_n | Int64 | Sample size of pts_per75: off_rtg_n, copied. |
opp_pts_per75_n | Int64 | Sample size of opp_pts_per75: def_rtg_n, copied. |
plus_minus_per75_n | Int64 | Sample size of plus_minus_per75: net_rtg_n, copied. |
lg_rtg | Float64 | Points per 100 possessions of the season's league-average offense (pooled over every five-man unit), the zero the factor points are measured from. |
off_efg_pts | Float64 | Offensive shooting (eFG%) points per 100 possessions against the league average: the part of off_rtg - lg_rtg the shooting (eFG%) factor explains, at fixed linear prices from the season's league counts (factor_points). The four off_pts add up to off_rtg - lg_rtg and, with the four def_pts, to net_rtg exactly. Null when the unit started no possession (poss = 0). |
off_tov_pts | Float64 | Offensive turnovers points per 100 possessions against the league average: the part of off_rtg - lg_rtg the turnovers factor explains, at fixed linear prices from the season's league counts (factor_points). The four off_pts add up to off_rtg - lg_rtg and, with the four def_pts, to net_rtg exactly. Null when the unit started no possession (poss = 0). |
off_orb_pts | Float64 | Offensive rebounding points per 100 possessions against the league average: the part of off_rtg - lg_rtg the offensive rebounding factor explains, at fixed linear prices from the season's league counts (factor_points). The four off_pts add up to off_rtg - lg_rtg and, with the four def_pts, to net_rtg exactly. Null when the unit started no possession (poss = 0). |
off_ft_pts | Float64 | Offensive free throws points per 100 possessions against the league average: the part of off_rtg - lg_rtg the free throws factor explains, at fixed linear prices from the season's league counts (factor_points). The four off_pts add up to off_rtg - lg_rtg and, with the four def_pts, to net_rtg exactly. The free-throw part is the remainder of the other three: the free throws' price plus the possessions and points the box estimate does not explain (on the pros, the possession count's distance from the box estimate, which weights a free-throw attempt 0.44, less the league's average gap per FGA), so its sign can differ from the free-throw factor's. |
def_efg_pts | Float64 | Defensive shooting (eFG%) points per 100 defensive possessions against the league average, positive is better for the team: the part of lg_rtg - def_rtg it explains (factor_points). The four def_pts add up to lg_rtg - def_rtg and, with the four off_pts, to net_rtg exactly. Null when the unit faced no possession (opp_poss = 0). |
def_tov_pts | Float64 | Defensive turnovers points per 100 defensive possessions against the league average, positive is better for the team: the part of lg_rtg - def_rtg it explains (factor_points). The four def_pts add up to lg_rtg - def_rtg and, with the four off_pts, to net_rtg exactly. Null when the unit faced no possession (opp_poss = 0). |
def_orb_pts | Float64 | Defensive rebounding points (the opponents' offensive rebounding) per 100 defensive possessions against the league average, positive is better for the team: the part of lg_rtg - def_rtg it explains (factor_points). The four def_pts add up to lg_rtg - def_rtg and, with the four off_pts, to net_rtg exactly. Null when the unit faced no possession (opp_poss = 0). |
def_ft_pts | Float64 | Defensive free throws points per 100 defensive possessions against the league average, positive is better for the team: the part of lg_rtg - def_rtg it explains (factor_points). The four def_pts add up to lg_rtg - def_rtg and, with the four off_pts, to net_rtg exactly. The free-throw part is the remainder of the other three: the free throws' price plus the possessions and points the box estimate does not explain (on the pros, the possession count's distance from the box estimate, which weights a free-throw attempt 0.44, less the league's average gap per FGA), so its sign can differ from the free-throw factor's. |
efg_pts | Float64 | Net shooting (eFG%) points per 100: off_efg_pts + def_efg_pts. The four (efg_pts, tov_pts, orb_pts, ft_pts) add up to net_rtg exactly. Null when either side has no possessions. |
tov_pts | Float64 | Net turnovers points per 100: off_tov_pts + def_tov_pts. The four (efg_pts, tov_pts, orb_pts, ft_pts) add up to net_rtg exactly. Null when either side has no possessions. |
orb_pts | Float64 | Net offensive rebounding points per 100: off_orb_pts + def_orb_pts. The four (efg_pts, tov_pts, orb_pts, ft_pts) add up to net_rtg exactly. Null when either side has no possessions. |
ft_pts | Float64 | Net free throws points per 100: off_ft_pts + def_ft_pts, the remainder parts, so more than the free throws (see off_ft_pts). The four (efg_pts, tov_pts, orb_pts, ft_pts) add up to net_rtg exactly. Null when either side has no possessions. |
wnba_matchup_drapm
wnba_matchup_drapm(season: 'str', *, matchups: "'Optional[pl.DataFrame]'" = None, config: "'Optional[PlaytypeConfig]'" = None, return_as_pandas: 'bool' = False) -> "'Union[pl.DataFrame, pd.DataFrame]'"
WNBA matchup defensive RAPM (league_id="10").
Thin wrapper binding
sportsdataverse.nba.nba_matchup_drapm.nba_matchup_drapm to the
women's league.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
season | str | Season string, e.g. "2024". | |
matchups | Optional[DataFrame] | None | Injected nba_stats_leagueseasonmatchups-shaped frame. |
config | Optional[PlaytypeConfig] | None | ~sportsdataverse.nba.nba_playtype_constants.PlaytypeConfig override. |
return_as_pandas | bool | False | Return a pandas DataFrame instead of polars. |
Returns
Same schema as sportsdataverse.nba.nba_matchup_drapm.nba_matchup_drapm.
No returns table is published for this function: no capture: it reads stats.nba.com (WNBA league id 10), which answers HTTP 403 to the datacenter IP the docs are built on; the function works from a residential IP.
Example
from sportsdataverse.wnba import wnba_matchup_drapm
d = wnba_matchup_drapm("2024")
print(d.sort("matchup_drapm", descending=True).head())
wnba_official_seasons
wnba_official_seasons(seasons: 'int | list[int]', *, season_type: 'int | None' = 2, return_as_pandas: 'bool' = False) -> 'pl.DataFrame | pd.DataFrame'
WNBA official season profiles: games, fouls and FTA per game, pace and home splits.
One row per official and season over the completed games of season_type the official
worked. fouls_per_game and fta_per_game are both teams' totals from ESPN's team box;
pace is possessions (FGA - ORB + TOV + 0.44 FTA, averaged over the two teams) per 40
minutes, over the games' minutes including overtime; home_win_pct and
home_minus_away_fouls (home fouls less away fouls, per game) leave out neutral-site
games. Every rate has <m>_n, the games it is computed over. The release keys officials by
ESPN's official_id.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
seasons | int | list[int] | A season or list of seasons, named by the year it ends (the WNBA season is its calendar year). | |
season_type | int | None | 2 | ESPN's season type: 2 regular season (default), 3 postseason; None keeps every type. |
return_as_pandas | bool | False | Return a pandas frame instead of polars. |
Returns
One row per (season, official): season, official_id (Int64), official_name, games, fouls_per_game, fta_per_game, pace, home_win_pct and home_minus_away_fouls, each rate with its _n. A season without an officials release returns that schema with zero rows.
| col_name | type | description |
|---|---|---|
season | Int64 | Season, named by the year it ends (the WNBA season is its calendar year). |
official_id | Int64 | ESPN official id where the officials release carries one (WNBA, WBB); null where it has names only (NBA, MBB). |
official_name | String | Official's name, whitespace-normalised; the key when official_id is null. |
games | Int64 | Completed games of the season type the officials table lists the official on. |
fouls_per_game | Float64 | Both teams' fouls per game (ESPN team box fouls), over fouls_per_game_n games. |
fouls_per_game_n | Int64 | Games with a two-team box behind fouls_per_game. |
fta_per_game | Float64 | Both teams' free-throw attempts per game, over fta_per_game_n games. |
fta_per_game_n | Int64 | Games with a two-team box behind fta_per_game. |
pace | Float64 | Possessions (FGA - ORB + TOV + 0.44 FTA, averaged over the two teams) per regulation length (48 minutes NBA, 40 otherwise), over the games' minutes including overtime. |
pace_n | Int64 | Games with a box possession estimate and a known last period behind pace. |
home_win_pct | Float64 | Share of the official's non-neutral-site games with a recorded winner that the home team won. |
home_win_pct_n | Int64 | Non-neutral-site games with a recorded home winner behind home_win_pct. |
home_minus_away_fouls | Float64 | Home team's fouls minus the away team's, per non-neutral-site game. |
home_minus_away_fouls_n | Int64 | Non-neutral-site games with a two-team box behind home_minus_away_fouls. |
Example
from sportsdataverse.wnba.wnba_official_seasons import wnba_official_seasons
refs = wnba_official_seasons(2025)
refs.sort("fouls_per_game", descending=True).select("official_name", "games", "fouls_per_game").head()
wnba_player_factor_rapm
wnba_player_factor_rapm(seasons: 'int | list[int]', *, league_id: 'str' = '10', season_type: 'str' = 'regular-season', min_poss: 'int | None' = None, return_as_pandas: 'bool' = False) -> 'pl.DataFrame | pd.DataFrame'
WNBA four-factor RAPM split (league_id='10'). See sportsdataverse.nba.nba_player_factor_rapm.nba_player_factor_rapm.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
seasons | int | list[int] | ||
league_id | str | '10' | |
season_type | str | 'regular-season' | |
min_poss | int | None | None | |
return_as_pandas | bool | False |
Returns
One row per (season, player_id): off_poss / def_poss, rapm / o_rapm / d_rapm, the ten components (the four factors and the remainder, each way; per 100 possessions, higher is better), <m>_rank / <m>_pct within the season among players with at least min_poss possessions, <m>_se (clustered by game), <m>_n, and the pts_per_fga and ridge_alpha of the fit. Ids are the stats.nba.com ids (Int64). Empty input returns that schema with zero rows.
| col_name | type | description |
|---|---|---|
season | Int64 | Season, named by the year it ends (the WNBA season is its calendar year). |
player_id | Int64 | stats.nba.com player id. |
off_poss | Int64 | Offensive possessions the player was on the floor for (with all ten lineup slots and counts known). |
def_poss | Int64 | Defensive possessions the player was on the floor for (with all ten lineup slots and counts known). |
rapm | Float64 | Plain RAPM per 100 possessions: o_rapm + d_rapm. |
o_rapm | Float64 | Offensive plain RAPM per 100 possessions (nba_rapm's single-season ridge, shrunk to zero); equals o_efg_rapm + o_tov_rapm + o_orb_rapm + o_ftr_rapm + o_other_rapm. Equals wnba_player_impact's (2024, 2025: to 1e-11). |
d_rapm | Float64 | Defensive plain RAPM per 100 possessions, sign-flipped so higher is better; equals d_efg_rapm + d_tov_rapm + d_drb_rapm + d_ftr_rapm + d_other_rapm. Equals wnba_player_impact's (2024, 2025: to 1e-11). |
o_efg_rapm | Float64 | Offensive shooting (eFG) component of o_rapm: the ridge fit to field-goal points less pts_per_fga per attempt, per 100 offensive possessions. |
o_tov_rapm | Float64 | Offensive turnover component of o_rapm: the ridge fit to -pts_per_fga per turnover, per 100 offensive possessions (positive = fewer turnovers). |
o_orb_rapm | Float64 | Offensive rebounding component of o_rapm: the ridge fit to +pts_per_fga per offensive rebound, per 100 offensive possessions. |
o_ftr_rapm | Float64 | Offensive free-throw component of o_rapm, on possessions with a free-throw attempt: the ridge fit to free-throw points less pts_per_fga per chance that ended in neither a shot nor a turnover (FT rate and FT%), per 100 offensive possessions. |
o_other_rapm | Float64 | Offensive remainder of o_rapm (bookkeeping, not a skill): the ridge fit to what the four factors leave of points - pts_per_fga, i.e. -pts_per_fga per chance with no shot, turnover or free throw (a period running out) and +pts_per_fga per shot or turnover beyond the recorded chances (an unrecorded offensive rebound); non-zero on about 1% of possessions. |
d_efg_rapm | Float64 | Defensive shooting (opponent eFG) component of d_rapm, per 100 possessions, sign-flipped so higher is better: positive = the opponent shoots worse. |
d_tov_rapm | Float64 | Defensive turnover component of d_rapm, per 100 possessions, sign-flipped so higher is better: positive = forces more turnovers. |
d_drb_rapm | Float64 | Defensive rebounding component of d_rapm, per 100 possessions, sign-flipped so higher is better: positive = fewer opponent offensive rebounds. |
d_ftr_rapm | Float64 | Defensive free-throw component of d_rapm, per 100 possessions, sign-flipped so higher is better: positive = fewer opponent free-throw points. |
d_other_rapm | Float64 | Defensive remainder of d_rapm (bookkeeping, not a skill), per 100 possessions, sign-flipped so higher is better: the opponent's o_other part. |
rapm_rank | Float64 | Rank of rapm within the season, league-wide (1 = best, highest first, ties averaged), among players with at least min_poss possessions (off_poss + def_poss, default 200); null below 10 qualifiers. Year over year (2024 to 2025, 92 players over 1,000 possessions) rapm repeats at Spearman 0.374, so single-season ranks are noisy. |
rapm_pct | Float64 | Percentile of rapm among the same qualified players: 100 * (n + 1 - rank) / (n + 1), n the number ranked; null where the rank is. Year over year (2024 to 2025, 92 players over 1,000 possessions) rapm repeats at Spearman 0.374, so single-season ranks are noisy. |
o_rapm_rank | Float64 | Rank of o_rapm within the season, league-wide (1 = best, highest first, ties averaged), among players with at least min_poss possessions (off_poss + def_poss, default 200); null below 10 qualifiers. Year over year (2024 to 2025, 92 players over 1,000 possessions) o_rapm repeats at Spearman 0.352, so single-season ranks are noisy. |
o_rapm_pct | Float64 | Percentile of o_rapm among the same qualified players: 100 * (n + 1 - rank) / (n + 1), n the number ranked; null where the rank is. Year over year (2024 to 2025, 92 players over 1,000 possessions) o_rapm repeats at Spearman 0.352, so single-season ranks are noisy. |
d_rapm_rank | Float64 | Rank of d_rapm within the season, league-wide (1 = best, highest first, ties averaged), among players with at least min_poss possessions (off_poss + def_poss, default 200); null below 10 qualifiers. Year over year (2024 to 2025, 92 players over 1,000 possessions) d_rapm repeats at Spearman 0.163, so single-season ranks are noisy. |
d_rapm_pct | Float64 | Percentile of d_rapm among the same qualified players: 100 * (n + 1 - rank) / (n + 1), n the number ranked; null where the rank is. Year over year (2024 to 2025, 92 players over 1,000 possessions) d_rapm repeats at Spearman 0.163, so single-season ranks are noisy. |
o_efg_rapm_rank | Float64 | Rank of o_efg_rapm within the season, league-wide (1 = best, highest first, ties averaged), among players with at least min_poss possessions (off_poss + def_poss, default 200); null below 10 qualifiers. Year over year (2024 to 2025, 92 players over 1,000 possessions) o_efg_rapm repeats at Spearman 0.304, so single-season ranks are noisy. |
o_efg_rapm_pct | Float64 | Percentile of o_efg_rapm among the same qualified players: 100 * (n + 1 - rank) / (n + 1), n the number ranked; null where the rank is. Year over year (2024 to 2025, 92 players over 1,000 possessions) o_efg_rapm repeats at Spearman 0.304, so single-season ranks are noisy. |
o_tov_rapm_rank | Float64 | Rank of o_tov_rapm within the season, league-wide (1 = best, highest first, ties averaged), among players with at least min_poss possessions (off_poss + def_poss, default 200); null below 10 qualifiers. Year over year (2024 to 2025, 92 players over 1,000 possessions) o_tov_rapm repeats at Spearman 0.357, so single-season ranks are noisy. |
o_tov_rapm_pct | Float64 | Percentile of o_tov_rapm among the same qualified players: 100 * (n + 1 - rank) / (n + 1), n the number ranked; null where the rank is. Year over year (2024 to 2025, 92 players over 1,000 possessions) o_tov_rapm repeats at Spearman 0.357, so single-season ranks are noisy. |
o_orb_rapm_rank | Float64 | Rank of o_orb_rapm within the season, league-wide (1 = best, highest first, ties averaged), among players with at least min_poss possessions (off_poss + def_poss, default 200); null below 10 qualifiers. Year over year (2024 to 2025, 92 players over 1,000 possessions) o_orb_rapm repeats at Spearman 0.307, so single-season ranks are noisy. |
o_orb_rapm_pct | Float64 | Percentile of o_orb_rapm among the same qualified players: 100 * (n + 1 - rank) / (n + 1), n the number ranked; null where the rank is. Year over year (2024 to 2025, 92 players over 1,000 possessions) o_orb_rapm repeats at Spearman 0.307, so single-season ranks are noisy. |
o_ftr_rapm_rank | Float64 | Rank of o_ftr_rapm within the season, league-wide (1 = best, highest first, ties averaged), among players with at least min_poss possessions (off_poss + def_poss, default 200); null below 10 qualifiers. Year over year (2024 to 2025, 92 players over 1,000 possessions) o_ftr_rapm repeats at Spearman 0.391, so single-season ranks are noisy. |
o_ftr_rapm_pct | Float64 | Percentile of o_ftr_rapm among the same qualified players: 100 * (n + 1 - rank) / (n + 1), n the number ranked; null where the rank is. Year over year (2024 to 2025, 92 players over 1,000 possessions) o_ftr_rapm repeats at Spearman 0.391, so single-season ranks are noisy. |
o_other_rapm_rank | Float64 | Rank of o_other_rapm within the season, league-wide (1 = best, highest first, ties averaged), among players with at least min_poss possessions (off_poss + def_poss, default 200); null below 10 qualifiers. Year over year (2024 to 2025, 92 players over 1,000 possessions) o_other_rapm repeats at Spearman 0.157, so single-season ranks are noisy. |
o_other_rapm_pct | Float64 | Percentile of o_other_rapm among the same qualified players: 100 * (n + 1 - rank) / (n + 1), n the number ranked; null where the rank is. Year over year (2024 to 2025, 92 players over 1,000 possessions) o_other_rapm repeats at Spearman 0.157, so single-season ranks are noisy. |
d_efg_rapm_rank | Float64 | Rank of d_efg_rapm within the season, league-wide (1 = best, highest first, ties averaged), among players with at least min_poss possessions (off_poss + def_poss, default 200); null below 10 qualifiers. Year over year (2024 to 2025, 92 players over 1,000 possessions) d_efg_rapm repeats at Spearman 0.128, so single-season ranks are noisy. |
d_efg_rapm_pct | Float64 | Percentile of d_efg_rapm among the same qualified players: 100 * (n + 1 - rank) / (n + 1), n the number ranked; null where the rank is. Year over year (2024 to 2025, 92 players over 1,000 possessions) d_efg_rapm repeats at Spearman 0.128, so single-season ranks are noisy. |
d_tov_rapm_rank | Float64 | Rank of d_tov_rapm within the season, league-wide (1 = best, highest first, ties averaged), among players with at least min_poss possessions (off_poss + def_poss, default 200); null below 10 qualifiers. Year over year (2024 to 2025, 92 players over 1,000 possessions) d_tov_rapm repeats at Spearman 0.337, so single-season ranks are noisy. |
d_tov_rapm_pct | Float64 | Percentile of d_tov_rapm among the same qualified players: 100 * (n + 1 - rank) / (n + 1), n the number ranked; null where the rank is. Year over year (2024 to 2025, 92 players over 1,000 possessions) d_tov_rapm repeats at Spearman 0.337, so single-season ranks are noisy. |
d_drb_rapm_rank | Float64 | Rank of d_drb_rapm within the season, league-wide (1 = best, highest first, ties averaged), among players with at least min_poss possessions (off_poss + def_poss, default 200); null below 10 qualifiers. Year over year (2024 to 2025, 92 players over 1,000 possessions) d_drb_rapm repeats at Spearman 0.128, so single-season ranks are noisy. |
d_drb_rapm_pct | Float64 | Percentile of d_drb_rapm among the same qualified players: 100 * (n + 1 - rank) / (n + 1), n the number ranked; null where the rank is. Year over year (2024 to 2025, 92 players over 1,000 possessions) d_drb_rapm repeats at Spearman 0.128, so single-season ranks are noisy. |
d_ftr_rapm_rank | Float64 | Rank of d_ftr_rapm within the season, league-wide (1 = best, highest first, ties averaged), among players with at least min_poss possessions (off_poss + def_poss, default 200); null below 10 qualifiers. Year over year (2024 to 2025, 92 players over 1,000 possessions) d_ftr_rapm repeats at Spearman 0.306, so single-season ranks are noisy. |
d_ftr_rapm_pct | Float64 | Percentile of d_ftr_rapm among the same qualified players: 100 * (n + 1 - rank) / (n + 1), n the number ranked; null where the rank is. Year over year (2024 to 2025, 92 players over 1,000 possessions) d_ftr_rapm repeats at Spearman 0.306, so single-season ranks are noisy. |
d_other_rapm_rank | Float64 | Rank of d_other_rapm within the season, league-wide (1 = best, highest first, ties averaged), among players with at least min_poss possessions (off_poss + def_poss, default 200); null below 10 qualifiers. Year over year (2024 to 2025, 92 players over 1,000 possessions) d_other_rapm repeats at Spearman 0.343, so single-season ranks are noisy. |
d_other_rapm_pct | Float64 | Percentile of d_other_rapm among the same qualified players: 100 * (n + 1 - rank) / (n + 1), n the number ranked; null where the rank is. Year over year (2024 to 2025, 92 players over 1,000 possessions) d_other_rapm repeats at Spearman 0.343, so single-season ranks are noisy. |
rapm_se | Float64 | Standard error of rapm, clustered by game (the ridge sandwich): sampling noise around the shrunk estimate, not the shrinkage bias. |
o_rapm_se | Float64 | Standard error of o_rapm, clustered by game (the ridge sandwich): sampling noise around the shrunk estimate, not the shrinkage bias. |
d_rapm_se | Float64 | Standard error of d_rapm, clustered by game (the ridge sandwich): sampling noise around the shrunk estimate, not the shrinkage bias. |
o_efg_rapm_se | Float64 | Standard error of o_efg_rapm, clustered by game (the ridge sandwich): sampling noise around the shrunk estimate, not the shrinkage bias. |
o_tov_rapm_se | Float64 | Standard error of o_tov_rapm, clustered by game (the ridge sandwich): sampling noise around the shrunk estimate, not the shrinkage bias. |
o_orb_rapm_se | Float64 | Standard error of o_orb_rapm, clustered by game (the ridge sandwich): sampling noise around the shrunk estimate, not the shrinkage bias. |
o_ftr_rapm_se | Float64 | Standard error of o_ftr_rapm, clustered by game (the ridge sandwich): sampling noise around the shrunk estimate, not the shrinkage bias. |
o_other_rapm_se | Float64 | Standard error of o_other_rapm, clustered by game (the ridge sandwich): sampling noise around the shrunk estimate, not the shrinkage bias. |
d_efg_rapm_se | Float64 | Standard error of d_efg_rapm, clustered by game (the ridge sandwich): sampling noise around the shrunk estimate, not the shrinkage bias. |
d_tov_rapm_se | Float64 | Standard error of d_tov_rapm, clustered by game (the ridge sandwich): sampling noise around the shrunk estimate, not the shrinkage bias. |
d_drb_rapm_se | Float64 | Standard error of d_drb_rapm, clustered by game (the ridge sandwich): sampling noise around the shrunk estimate, not the shrinkage bias. |
d_ftr_rapm_se | Float64 | Standard error of d_ftr_rapm, clustered by game (the ridge sandwich): sampling noise around the shrunk estimate, not the shrinkage bias. |
d_other_rapm_se | Float64 | Standard error of d_other_rapm, clustered by game (the ridge sandwich): sampling noise around the shrunk estimate, not the shrinkage bias. |
rapm_n | Int64 | Sample size of rapm: off_poss + def_poss. |
o_rapm_n | Int64 | Sample size of o_rapm: off_poss. |
d_rapm_n | Int64 | Sample size of d_rapm: def_poss. |
o_efg_rapm_n | Int64 | Sample size of o_efg_rapm: off_poss. |
o_tov_rapm_n | Int64 | Sample size of o_tov_rapm: off_poss. |
o_orb_rapm_n | Int64 | Sample size of o_orb_rapm: off_poss. |
o_ftr_rapm_n | Int64 | Sample size of o_ftr_rapm: off_poss. |
o_other_rapm_n | Int64 | Sample size of o_other_rapm: off_poss. |
d_efg_rapm_n | Int64 | Sample size of d_efg_rapm: def_poss. |
d_tov_rapm_n | Int64 | Sample size of d_tov_rapm: def_poss. |
d_drb_rapm_n | Int64 | Sample size of d_drb_rapm: def_poss. |
d_ftr_rapm_n | Int64 | Sample size of d_ftr_rapm: def_poss. |
d_other_rapm_n | Int64 | Sample size of d_other_rapm: def_poss. |
pts_per_fga | Float64 | The season's points per field-goal attempt, the value of one shot used in the split (pts_per_fga per turnover, offensive rebound and free-throw chance). |
ridge_alpha | Float64 | The ridge penalty of the fit, shared by every component so they add up: plain RAPM's fixed league value (NBA 2,683, WNBA 1,931; sportsdataverse.nba.nba_rapm.RAPM_PENALTY), the same in every season. Rows fit before November 2026 carry RidgeCV's per-season leave-one-out pick instead, on a scale that changed with it. |
wnba_player_game_expected_box
wnba_player_game_expected_box(seasons: 'int | list[int]', *, return_as_pandas: 'bool' = False) -> 'pl.DataFrame | pd.DataFrame'
WNBA points, rebounds and assists per player-game against his season, per minute and usage-adjusted.
For every played player-game: <s>_base is his season per-minute rate times the game's
minutes; <s>_exp scales that by the game's usage and minutes against his season's
(a Poisson model fitted on earlier seasons, scored on later held-out ones). Both use the
season without this game (over the regular season (a playoff or play-in game is measured against it)), so a game is never in its own baseline.
<s>_exp is null before the model's first held-out season and where a usage is unknown.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
seasons | int | list[int] | A season or list of seasons, named by the year it ends (2025 is the 2025 season). | |
return_as_pandas | bool | False | Return a pandas frame instead of polars. |
Returns
One row per (game_id, athlete_id): season, season_type, team_id, minutes, usg_pct, pts / reb / ast, the season-without-the-game rate_games / rate_minutes / rate_usg_pct, and pts_base / reb_base / ast_base / pts_exp / reb_exp / ast_exp. A season without a release returns that schema with zero rows.
| col_name | type | description |
|---|---|---|
season | Int64 | Season, named by the year it ends (the WNBA season is its calendar year). |
season_type | Int64 | ESPN season type of the game (2 regular season, 3 postseason, 5 NBA play-in). |
game_id | Int64 | ESPN game id, the join key to the schedule and the player box score. |
team_id | Int64 | ESPN team id of the player's team in the game. |
athlete_id | Int64 | ESPN athlete id of the player, the join key to the player box score. |
minutes | Float64 | Minutes played in the game (above 0: a player who did not play has no row). |
usg_pct | Float64 | Usage: 100 x uses x (team minutes / 5) / (minutes x team uses), uses = FGA + 0.44 FTA + TOV, the team sums over that team-game's players; null where a player of the team-game lacks a count. |
pts | Int64 | Points in the game. |
reb | Int64 | Rebounds in the game. |
ast | Int64 | Assists in the game. |
rate_games | Int64 | Games of the season without this one (the pros' regular season, every college game) that the expectations read. |
rate_minutes | Float64 | Minutes of those games. |
rate_usg_pct | Float64 | Season usage without this game: 100 x sum(uses) / sum(minutes x team uses / (team minutes / 5)); null where no game of it has a usage. |
pts_base | Float64 | Expected points at the per-minute rate: the season-without-this-game points per minute times the game's minutes; null when that season has no minutes. |
reb_base | Float64 | Expected rebounds at the per-minute rate, as pts_base. |
ast_base | Float64 | Expected assists at the per-minute rate, as pts_base. |
pts_exp | Float64 | Usage-adjusted expected points: pts_base x exp(a + b_usg ln(usg_pct / rate_usg_pct) + b_min ln(minutes / rate minutes per game)), a Poisson fit on earlier seasons (sportsdataverse._common.player_box_expected); null before the model's first held-out season or without both usages. |
reb_exp | Float64 | Usage-adjusted expected rebounds, as pts_exp. |
ast_exp | Float64 | Usage-adjusted expected assists, as pts_exp. |
Example
import polars as pl
from sportsdataverse.wnba.wnba_player_box_expected import wnba_player_game_expected_box
games = wnba_player_game_expected_box(2025)
games.with_columns((pl.col("pts") - pl.col("pts_exp")).alias("pts_vs_exp")).sort("pts_vs_exp").tail()
wnba_player_on_off
wnba_player_on_off(seasons: 'int | list[int]', *, league_id: 'str' = '10', season_type: 'str' = 'regular-season', min_poss: 'int | None' = None, return_as_pandas: 'bool' = False) -> 'pl.DataFrame | pd.DataFrame'
WNBA player on/off (league_id='10'). See sportsdataverse.nba.nba_player_on_off.nba_player_on_off.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
seasons | int | list[int] | ||
league_id | str | '10' | |
season_type | str | 'regular-season' | |
min_poss | int | None | None | |
return_as_pandas | bool | False |
Returns
One row per (season, team_id, player_id): games on the floor and team_games, then for _on and _off the minutes, poss / opp_poss, pts / opp_pts, plus_minus and off_rtg / def_rtg / net_rtg (per 100 possessions); <rating>_diff (on minus off); <m>_rank / <m>_pct for the on and diff ratings (within the season, among players with at least min_poss both ways) and <m>_n for every rating. The off side counts only the team's games in his span with it, as stats.nba.com does: team_games_span (the team's games from his first game listed for it, on the floor, as a box-score DNP or on its inactive list, or the day after his last for an earlier team that season, to his last listed game or the day before his first for a later team, by the schedule's game_date), span_first_date / span_last_date. So poss_on + poss_off is the team's possessions over his span, and for a player traded or signed mid-season the off side and the difference are his time with the team. <total>_off_span / <rating>_off_span / <rating>_diff_span repeat the _off / _diff columns (a player with no dated game keeps the whole season in _off and null spans). Ids are the stats.nba.com ids (Int64). Empty input returns that schema with zero rows.
| col_name | type | description |
|---|---|---|
season | Int64 | Season, named by the year it ends (the WNBA season is its calendar year). |
team_id | Int64 | stats.nba.com team id. |
player_id | Int64 | stats.nba.com player (person) id. |
games | Int64 | Games the player was on the floor for the team. |
team_games | Int64 | Games the team played in the season (with play-by-play and possessions); games well short of it marks a player who missed time or was with the team for part of the season. |
minutes_on | Float64 | Game-clock minutes of the team's season with the player on the floor. |
poss_on | Int64 | The team's offensive possessions with the player on the floor (a possession belongs to the five on the floor when it starts). |
opp_poss_on | Int64 | The team's defensive possessions with the player on the floor. |
pts_on | Int64 | The team's points with the player on the floor, each scoring action credited to the lineup at that action (a free throw to the lineup at the last foul). |
opp_pts_on | Int64 | The opponent's points with the player on the floor, credited as pts_on is. |
plus_minus_on | Int64 | pts_on - opp_pts_on. |
off_rtg_on | Float64 | Offensive rating with the player on the floor: pts_on per 100 poss_on; null with no possessions. |
def_rtg_on | Float64 | Defensive rating with the player on the floor: opp_pts_on per 100 opp_poss_on; null with no possessions. |
net_rtg_on | Float64 | Net rating with the player on the floor: off_rtg_on - def_rtg_on; null when either is null. |
minutes_off | Float64 | Game-clock minutes with the player off the floor: the rest of the team's games in his span with it, a game-date approximation of stats.nba.com's roster window (from his first game for the team, or the day after his last for an earlier team that season, to the day before his first for a later team, else the season's end), the games he missed inside it included. |
poss_off | Int64 | The team's offensive possessions with the player off the floor: the rest of the team's games in his span with it, a game-date approximation of stats.nba.com's roster window (from his first game for the team, or the day after his last for an earlier team that season, to the day before his first for a later team, else the season's end), the games he missed inside it included (a possession belongs to the five on the floor when it starts). |
opp_poss_off | Int64 | The team's defensive possessions with the player off the floor: the rest of the team's games in his span with it, a game-date approximation of stats.nba.com's roster window (from his first game for the team, or the day after his last for an earlier team that season, to the day before his first for a later team, else the season's end), the games he missed inside it included. |
pts_off | Int64 | The team's points with the player off the floor: the rest of the team's games in his span with it, a game-date approximation of stats.nba.com's roster window (from his first game for the team, or the day after his last for an earlier team that season, to the day before his first for a later team, else the season's end), the games he missed inside it included, each scoring action credited to the lineup at that action (a free throw to the lineup at the last foul). |
opp_pts_off | Int64 | The opponent's points with the player off the floor: the rest of the team's games in his span with it, a game-date approximation of stats.nba.com's roster window (from his first game for the team, or the day after his last for an earlier team that season, to the day before his first for a later team, else the season's end), the games he missed inside it included, credited as pts_off is. |
plus_minus_off | Int64 | pts_off - opp_pts_off. |
off_rtg_off | Float64 | Offensive rating with the player off the floor: the rest of the team's games in his span with it, a game-date approximation of stats.nba.com's roster window (from his first game for the team, or the day after his last for an earlier team that season, to the day before his first for a later team, else the season's end), the games he missed inside it included: pts_off per 100 poss_off; null with no possessions. |
def_rtg_off | Float64 | Defensive rating with the player off the floor: the rest of the team's games in his span with it, a game-date approximation of stats.nba.com's roster window (from his first game for the team, or the day after his last for an earlier team that season, to the day before his first for a later team, else the season's end), the games he missed inside it included: opp_pts_off per 100 opp_poss_off; null with no possessions. |
net_rtg_off | Float64 | Net rating with the player off the floor: the rest of the team's games in his span with it, a game-date approximation of stats.nba.com's roster window (from his first game for the team, or the day after his last for an earlier team that season, to the day before his first for a later team, else the season's end), the games he missed inside it included: off_rtg_off - def_rtg_off; null when either is null. |
off_rtg_diff | Float64 | On-off offensive rating: off_rtg_on - off_rtg_off; null when either is null. |
def_rtg_diff | Float64 | On-off defensive rating: def_rtg_on - def_rtg_off; null when either is null. |
net_rtg_diff | Float64 | On-off net rating: net_rtg_on - net_rtg_off; null when either is null. |
off_rtg_on_rank | Float64 | Rank of off_rtg_on within the season, league-wide (1 = best, highest first, ties averaged), among players with at least min_poss possessions (offense plus defense) both on and off the floor (default 200), whose off_rtg_on_n is at least 610 offensive possessions on the floor (the sample at which the rate was, on the fit seasons, half signal, rate_gates); null under that gate or below 10 qualifiers. An owner-accepted exception (2026-11-09), as on the unseen 2023-2025 seasons the 610-possession gate is 0.27 signal, under a third, measured on halves that include playoff games (0.35 on regular-season games alone); the rank stays published, as no data or source defect was found (rate_gates). |
def_rtg_on_rank | Float64 | Rank of def_rtg_on within the season, league-wide (1 = best, lowest first, ties averaged), among players with at least min_poss possessions (offense plus defense) both on and off the floor (default 200), whose def_rtg_on_n is at least 1,200 defensive possessions on the floor (the sample at which the rate was, on the fit seasons, half signal, rate_gates); null under that gate or below 10 qualifiers. |
net_rtg_on_rank | Float64 | Rank of net_rtg_on within the season, league-wide (1 = best, highest first, ties averaged), among players with at least min_poss possessions (offense plus defense) both on and off the floor (default 200), whose net_rtg_on_n is at least 1,600 possessions on the floor (offense plus defense) (the sample at which the rate was, on the fit seasons, half signal, rate_gates); null under that gate or below 10 qualifiers. |
off_rtg_diff_rank | Float64 | Rank of off_rtg_diff within the season, league-wide (1 = best, highest first, ties averaged), among players with at least min_poss possessions (offense plus defense) both on and off the floor (default 200), whose off_rtg_diff_n is at least 780 offensive possessions on the thinner side (on or off the floor) (the sample at which the rate was, on the fit seasons, half signal, rate_gates); null under that gate or below 10 qualifiers. |
def_rtg_diff_rank | Float64 | Rank of def_rtg_diff within the season, league-wide (1 = best, lowest first, ties averaged), among players with at least min_poss possessions (offense plus defense) both on and off the floor (default 200), and never for def_rtg_diff: its reliability never comes near half signal on a season's sample (rate_gates); null under that gate or below 10 qualifiers. |
net_rtg_diff_rank | Float64 | Rank of net_rtg_diff within the season, league-wide (1 = best, highest first, ties averaged), among players with at least min_poss possessions (offense plus defense) both on and off the floor (default 200), and never for net_rtg_diff: on the seasons after the fit its reliability never comes near half signal (an owner ruling, rate_gates); null under that gate or below 10 qualifiers. |
off_rtg_on_pct | Float64 | Percentile of off_rtg_on among the same qualified players: 100 * (n + 1 - rank) / (n + 1), n the number ranked; null where the rank is. |
def_rtg_on_pct | Float64 | Percentile of def_rtg_on among the same qualified players: 100 * (n + 1 - rank) / (n + 1), n the number ranked; null where the rank is. |
net_rtg_on_pct | Float64 | Percentile of net_rtg_on among the same qualified players: 100 * (n + 1 - rank) / (n + 1), n the number ranked; null where the rank is. |
off_rtg_diff_pct | Float64 | Percentile of off_rtg_diff among the same qualified players: 100 * (n + 1 - rank) / (n + 1), n the number ranked; null where the rank is. |
def_rtg_diff_pct | Float64 | Percentile of def_rtg_diff among the same qualified players: 100 * (n + 1 - rank) / (n + 1), n the number ranked; null where the rank is. |
net_rtg_diff_pct | Float64 | Percentile of net_rtg_diff among the same qualified players: 100 * (n + 1 - rank) / (n + 1), n the number ranked; null where the rank is. |
off_rtg_on_n | Int64 | Sample size of off_rtg_on: poss_on. |
def_rtg_on_n | Int64 | Sample size of def_rtg_on: opp_poss_on. |
net_rtg_on_n | Int64 | Sample size of net_rtg_on: poss_on + opp_poss_on. |
off_rtg_off_n | Int64 | Sample size of off_rtg_off: poss_off. |
def_rtg_off_n | Int64 | Sample size of def_rtg_off: opp_poss_off. |
net_rtg_off_n | Int64 | Sample size of net_rtg_off: poss_off + opp_poss_off. |
off_rtg_diff_n | Int64 | Sample size of off_rtg_diff: the smaller of off_rtg_on_n and off_rtg_off_n. |
def_rtg_diff_n | Int64 | Sample size of def_rtg_diff: the smaller of def_rtg_on_n and def_rtg_off_n. |
net_rtg_diff_n | Int64 | Sample size of net_rtg_diff: the smaller of net_rtg_on_n and net_rtg_off_n. |