Skip to main content

MBB — Bart Torvik T-Rank (barttorvik.com)

sportsdataverse.mbb — 5 endpoints.

torvik_ratings​

GET /{year}_team_results.csv — men's T-Rank team ratings (adjoe/adjde/barthag, one row per team; the team/conf pair feeds the MBB crosswalk).

Endpoint URL: GET https://barttorvik.com/{year}_team_results.csv

Valid URL: https://barttorvik.com/2025_team_results.csv

API ParameterPythonPatternRequiredNullableDescription
yearyearYyear path parameter.

Returns​

return_parsed=True (default) — a tidy polars.DataFrame with the columns below; pass return_as_pandas=True for a pandas.DataFrame.

col_nametypedescription
rankintegerT-Rank position (overall barthag rank).
teamcharacterTorvik team name (the crosswalk join key).
confcharacterTorvik conference abbreviation (e.g. B12, ACC, BE).
recordcharacterOverall win-loss record to date.
adjoenumericAdjusted offensive efficiency (points per 100 possessions vs an average defense).
oe_rankintegerNational rank of adjusted offensive efficiency.
adjdenumericAdjusted defensive efficiency (points allowed per 100 possessions vs an average offense).
de_rankintegerNational rank of adjusted defensive efficiency.
barthagnumericTorvik power rating: win probability vs an average team on a neutral floor.
rank_2integerBarthag rank repeated as shipped in the source CSV (duplicate of rank).
proj_wnumericProjected full-season wins.
proj_lnumericProjected full-season losses.
pro_con_wnumericProjected conference wins.
pro_con_lnumericProjected conference losses.
con_reccharacterConference win-loss record to date.
sosnumericStrength of schedule faced to date.
ncsosnumericNon-conference strength of schedule.
consosnumericConference strength of schedule.
proj_sosnumericProjected full-season strength of schedule.
proj_noncon_sosnumericProjected non-conference strength of schedule.
proj_con_sosnumericProjected conference strength of schedule.
elite_sosnumericElite strength of schedule (share of schedule vs elite opponents).
elite_noncon_sosnumericElite non-conference strength of schedule.
opp_oenumericAverage opponent offensive efficiency.
opp_denumericAverage opponent defensive efficiency.
opp_proj_oenumericProjected average opponent offensive efficiency.
opp_proj_denumericProjected average opponent defensive efficiency.
con_adj_oenumericAdjusted offensive efficiency in conference games only.
con_adj_denumericAdjusted defensive efficiency in conference games only.
qual_onumericOffensive efficiency vs quality (top-tier) opponents.
qual_dnumericDefensive efficiency vs quality (top-tier) opponents.
qual_barthagnumericBarthag computed from the quality-opponent efficiency splits.
qual_gamesnumericNumber of quality games underlying the qual_* splits.
funnumericTorvik's FUN style/entertainment index.
con_pfnumericPoints scored in conference play.
con_panumericPoints allowed in conference play.
con_possnumericPossessions played in conference play.
con_oenumericRaw offensive efficiency in conference play.
con_denumericRaw defensive efficiency in conference play.
con_sos_remainnumericStrength of the remaining conference schedule.
conf_win_percentnumericConference win percentage.
wabnumericWins above bubble (resume quality vs a bubble-level team).
wab_rkintegerNational rank of wins above bubble.
fun_rkintegerNational rank of the FUN index.
adjtnumericAdjusted tempo (possessions per 40 minutes).

return_parsed=False — the raw CSV response body (str).

Example​

torvik_ratings(year=2025)

Last validated n/a.

torvik_team_factors​

GET /{year}_fffinal.csv — men's four-factors splits (eFG%/FTR/OR%/TO% offense + defense, with per-stat ranks).

Endpoint URL: GET https://barttorvik.com/{year}_fffinal.csv

Valid URL: https://barttorvik.com/2025_fffinal.csv

API ParameterPythonPatternRequiredNullableDescription
yearyearYyear path parameter.

Returns​

return_parsed=True (default) — a tidy polars.DataFrame with the columns below; pass return_as_pandas=True for a pandas.DataFrame.

col_nametypedescription
team_namecharacterTorvik team name.
e_fg_percentnumericEffective field-goal percentage on offense.
rkintegerNational rank of offensive eFG%.
e_fg_percent_defnumericEffective field-goal percentage allowed on defense.
rk_2integerNational rank of defensive eFG% allowed.
ftrnumericFree-throw rate on offense (FTA per FGA).
rk_3integerNational rank of offensive free-throw rate.
ftr_defnumericFree-throw rate allowed on defense.
rk_4integerNational rank of defensive free-throw rate allowed.
or_percentnumericOffensive rebound percentage.
rk_5integerNational rank of offensive rebound percentage.
dr_percentnumericDefensive rebound percentage.
rk_6integerNational rank of defensive rebound percentage.
to_percentnumericTurnover percentage on offense.
rk_7integerNational rank of offensive turnover percentage.
to_percent_defnumericTurnover percentage forced on defense.
rk_8integerNational rank of defensive turnover percentage forced.
x3p_percentnumericThree-point percentage on offense.
rk_9integerNational rank of offensive three-point percentage.
x3p_d_percentnumericThree-point percentage allowed on defense.
rk_10integerNational rank of three-point percentage allowed.
x2p_percentnumericTwo-point percentage on offense.
rk_11integerNational rank of offensive two-point percentage.
x2p_percent_dnumericTwo-point percentage allowed on defense.
rk_12integerNational rank of two-point percentage allowed.
ft_percentnumericFree-throw percentage.
rk_13integerNational rank of free-throw percentage.
ft_percent_dnumericOpponent free-throw percentage.
rk_14integerNational rank of opponent free-throw percentage.
x3p_ratenumericThree-point attempt rate on offense (3PA per FGA).
rk_15integerNational rank of offensive three-point attempt rate.
x3p_rate_dnumericThree-point attempt rate allowed on defense.
rk_16integerNational rank of three-point attempt rate allowed.
aratenumericAssist rate on offense (assists per made field goal).
rk_17integerNational rank of offensive assist rate.
arate_dnumericAssist rate allowed on defense.
rk_18integerNational rank of assist rate allowed.
unnamednumericHeaderless trailing column shipped in the source CSV (undocumented upstream).
unnamed_2integerHeaderless trailing column shipped in the source CSV (undocumented upstream).
unnamed_3numericHeaderless trailing column shipped in the source CSV (undocumented upstream).
unnamed_4integerHeaderless trailing column shipped in the source CSV (undocumented upstream).

return_parsed=False — the raw CSV response body (str).

Example​

torvik_team_factors(year=2025)

Last validated n/a.

torvik_game_stats​

GET /getgamestats.php?year=&json=1 — men's per-team-game efficiency and four-factors log (one row per team-game, 31 positional fields).

Endpoint URL: GET https://barttorvik.com/getgamestats.php

Valid URL: https://barttorvik.com/getgamestats.php?year=2025

API ParameterPythonPatternRequiredNullableDescription
yearyearY4-digit season ending year (2025 = the 2024-25 season).
jsonjsonYResponse format switch; leave at 1 (the parser expects the headerless JSON array).

Returns​

return_parsed=True (default) — a tidy polars.DataFrame with the columns below; pass return_as_pandas=True for a pandas.DataFrame.

col_nametypedescription
datecharacterGame date as Torvik prints it (m/d/yy).
typeintegerTorvik game-type code (observed 0-3; 1 is the most common); Torvik does not document the codes.
teamcharacterTorvik team name for the row's team (the perspective of every other column).
confcharacterTorvik conference abbreviation of the row's team (e.g. B12, ACC).
oppcharacterTorvik team name of the opponent.
venuecharacterVenue from the row team's view: H home, A away, N neutral.
resultcharacterResult from the row team's view, e.g. 'L, 88-57' (W/L, team points, opponent points).
adj_oenumericRow team's pre-game adjusted offensive efficiency (points per 100 possessions).
adj_denumericRow team's pre-game adjusted defensive efficiency (points allowed per 100 possessions).
oenumericRow team's raw offensive efficiency in this game (points per 100 possessions).
off_efgnumericRow team's offensive effective field-goal percentage in this game.
off_tonumericRow team's offensive turnover percentage in this game.
off_ornumericRow team's offensive rebound percentage in this game.
off_ftrnumericRow team's free-throw rate on offense in this game.
denumericRow team's raw defensive efficiency in this game (points allowed per 100 possessions).
def_efgnumericOpponent's effective field-goal percentage against the row team.
def_tonumericOpponent's turnover percentage against the row team.
def_ornumericOpponent's offensive rebound percentage against the row team.
def_ftrnumericOpponent's free-throw rate against the row team.
game_scorenumericTorvik's Gscore, a 0-100 single-game performance rating for the row team.
opp_confcharacterTorvik conference abbreviation of the opponent.
quadintegerTorvik 'quad' field: observed values are only 1 and 2, tagging which side of the game the row is (each game appears once with each); not the NCAA quadrant.
yearintegerSeason ending year (2025 = the 2024-25 season).
temponumericPossessions per 40 minutes in this game.
muidcharacterTorvik matchup id: opponent-order-free concatenation of team names, date and venue; the same value appears in both teams' rows and in the schedule's muid.
coachcharacterHead coach of the row team.
opp_coachcharacterHead coach of the opponent.
marginnumericSigned margin from the row team's view (positive for a win, negative for a loss); Torvik ships it adjusted, so it differs from the raw score difference (-15.37 for an 88-57 loss).
win_probnumericTorvik 'win_prob' field as shipped; it is not the row team's own pre-game win probability (a 31-point loser carries 0.92), so treat it as opaque.
game_statscharacterJSON-encoded array of raw per-game box-score counts exactly as Torvik ships it; the positional layout is Torvik's and undocumented.
overtimesintegerTorvik 'overtimes' field as shipped; observed integers 0-13, which is too large for an overtime count, so treat it as opaque.
game_dateDatedate parsed to a Date (null when it does not parse).

return_parsed=False — the raw CSV response body (str).

Example​

torvik_game_stats(year=2025)

Last validated n/a.

torvik_player_stats​

GET /getadvstats.php?year=&csv=1 — men's player advanced stats (one row per player, 67 positional fields).

Endpoint URL: GET https://barttorvik.com/getadvstats.php

Valid URL: https://barttorvik.com/getadvstats.php?year=2025

API ParameterPythonPatternRequiredNullableDescription
yearyearY4-digit season ending year (2025 = the 2024-25 season).
csvcsvYResponse format switch; leave at 1 (the parser expects the headerless CSV).

Returns​

return_parsed=True (default) — a tidy polars.DataFrame with the columns below; pass return_as_pandas=True for a pandas.DataFrame.

col_nametypedescription
player_namecharacterPlayer name as Torvik lists it, 'First Last' (e.g. Robby Carmody).
teamcharacterTorvik team name the player is listed with (e.g. Le Moyne); matches the ratings team column.
confcharacterTorvik conference abbreviation.
gamesintegerGames the player appeared in this season.
min_pctnumericShare of team minutes played, in percent.
o_rtgnumericOffensive rating (points produced per 100 individual possessions).
usagenumericUsage rate: share of team possessions used while on the floor, in percent.
e_fgnumericEffective field-goal percentage.
ts_pctnumericTrue shooting percentage.
orb_pctnumericOffensive rebound percentage.
drb_pctnumericDefensive rebound percentage.
ast_pctnumericAssist percentage.
to_pctnumericTurnover percentage.
ftmnumericFree throws made.
ftanumericFree throws attempted.
ft_pctnumericFree-throw percentage as a fraction (0-1).
two_pmnumericTwo-point field goals made.
two_panumericTwo-point field goals attempted.
two_p_pctnumericTwo-point field-goal percentage as a fraction (0-1).
three_pmnumericThree-point field goals made.
three_panumericThree-point field goals attempted.
three_p_pctnumericThree-point field-goal percentage as a fraction (0-1).
blk_pctnumericBlock percentage.
stl_pctnumericSteal percentage.
ftrnumericFree-throw rate (FTA per FGA, in percent).
classcharacterClass year (Fr, So, Jr, Sr).
heightcharacterListed height as feet-inches, e.g. 6-4.
numberintegerJersey number as listed (Int64).
porpagnumericPoints over replacement per adjusted game (Torvik's PRPG!).
adj_oenumericPlayer's adjusted offensive efficiency.
pfrnumericPersonal fouls committed per 40 minutes.
yearintegerSeason ending year (2025 = the 2024-25 season).
player_idintegerTorvik numeric player id (Int64); the join key to other Torvik player pages.
hometowncharacterHometown as listed, e.g. 'Mars, PA'; blank for some players.
rec_ranknumericHigh-school recruiting rating; null for unranked players.
ast_tonumericAssist-to-turnover ratio.
rim_madenumericMade shots at the rim.
rim_attemptsnumericAttempted shots at the rim.
mid_madenumericMade two-point jump shots (non-rim twos).
mid_attemptsnumericAttempted two-point jump shots (non-rim twos).
rim_pctnumericField-goal percentage at the rim as a fraction (0-1).
mid_pctnumericField-goal percentage on non-rim twos as a fraction (0-1).
dunks_madenumericDunks made over the season.
dunks_attemptsnumericDunks attempted.
dunks_pctnumericDunk percentage as a fraction (0-1).
picknumericNBA draft pick number; null for players not drafted.
drtgnumericDefensive rating (points allowed per 100 individual defensive possessions).
adrtgnumericAdjusted defensive rating.
dporpagnumericDefensive points over replacement per adjusted game.
stopsnumericDefensive stops.
bpmnumericBox plus/minus.
obpmnumericOffensive box plus/minus.
dbpmnumericDefensive box plus/minus.
gbpmnumericTorvik's game-level box plus/minus.
minutesnumericShare of team minutes played, in percent (as on the Torvik player page).
ogbpmnumericOffensive game box plus/minus.
dgbpmnumericDefensive game box plus/minus.
orebnumericOffensive rebounds per game.
drebnumericDefensive rebounds per game.
trebnumericTotal rebounds per game.
astnumericAssists per game.
stlnumericSteals per game.
blknumericBlocks per game.
ptsnumericPoints per game.
rolecharacterTorvik's position/role label, e.g. 'Combo G' or 'Scoring PG'.
threatnumericTorvik's scoring-threat rating.
recruit_datecharacterTorvik's 'recruit_date' field; the values are ISO dates that look like birth dates, kept verbatim as text.

return_parsed=False — the raw CSV response body (str).

Example​

torvik_player_stats(year=2025)

Last validated n/a.

torvik_game_schedule​

GET /{year}_super_sked.json — men's season schedule/results with T-Rank projections (one row per game, 55 positional fields).

Endpoint URL: GET https://barttorvik.com/{year}_super_sked.json

Valid URL: https://barttorvik.com/2025_super_sked.json

API ParameterPythonPatternRequiredNullableDescription
yearyearYyear path parameter.

Returns​

return_parsed=True (default) — a tidy polars.DataFrame with the columns below; pass return_as_pandas=True for a pandas.DataFrame.

col_nametypedescription
muidcharacterTorvik matchup id; equals the game_stats muid.
datecharacterGame date as Torvik prints it (m/d/yy).
conmatchcharacterConference matchup descriptor, e.g. 'D2 at Amer'.
matchupcharacterRank-annotated matchup text, e.g. '0 Northeastern St. at 243 Tulsa'.
predictioncharacterPre-game prediction text (favorite, margin, score, win probability).
ttqcharacterTorvik Thrill Quotient (game excitement).
confcharacterConference-game flag/code as Torvik ships it (observed 0 and 99).
venuecharacterVenue / neutral-site flag as Torvik ships it (0 observed on home/away games).
team1characterFirst-listed team name.
t1oecharacterteam1 adjusted offensive efficiency going into the game.
t1decharacterteam1 adjusted defensive efficiency going into the game.
t1pycharacterteam1 pre-game win probability (fraction 0-1).
t1wpcharacterteam1 win indicator as Torvik ships it (1 when team1 won).
t1proptcharacterteam1 projected points.
team2characterSecond-listed team name.
t2oecharacterteam2 adjusted offensive efficiency going into the game.
t2decharacterteam2 adjusted defensive efficiency going into the game.
t2pycharacterteam2 pre-game win probability (fraction 0-1).
t2wpcharacterteam2 win indicator as Torvik ships it (1 when team2 won).
t2proptcharacterteam2 projected points.
tprocharacterProjected tempo (possessions) for the game.
t1qualcharacterTorvik quality marker for team1: the team name when set, blank otherwise.
t2qualcharacterTorvik quality marker for team2: the team name when set, blank otherwise.
gpcharacterGame-played flag (1 if completed).
resultcharacterFinal result text from team1's view; blank until played.
tempocharacterActual tempo (possessions per 40 minutes); blank until played.
possessionscharacterActual possessions; blank until played.
t1ptscharacterteam1 final points; blank until played.
t2ptscharacterteam2 final points; blank until played.
winnercharacterWinning team name; blank until played.
losercharacterLosing team name; blank until played.
t1adjtcharacterteam1 adjusted tempo.
t2adjtcharacterteam2 adjusted tempo.
t1adjocharacterGame-level adjusted offensive efficiency for team1 as Torvik ships it (0 when unrated).
t1adjdcharacterGame-level adjusted defensive efficiency for team1 as Torvik ships it (0 when unrated).
t2adjocharacterGame-level adjusted offensive efficiency for team2 as Torvik ships it (0 when unrated).
t2adjdcharacterGame-level adjusted defensive efficiency for team2 as Torvik ships it (0 when unrated).
gamevaluecharacterTorvik's single-game quality value for the matchup (0 for games between unrated teams).
mismatchcharacterTorvik's mismatch rating (how lopsided the matchup is).
blowoutcharacterTorvik's blowout rating.
t1elitecharacterTorvik elite-performance component for team1 (0-1).
t2elitecharacterTorvik elite-performance component for team2 (0-1).
ord_datecharacterProleptic Gregorian ordinal of the game date (Python date.toordinal).
t1pppcharacterteam1 points per possession in the game.
t2pppcharacterteam2 points per possession in the game.
gamepppcharacterCombined points per possession in the game.
t1rkcharacterteam1 T-Rank rank at game time.
t2rkcharacterteam2 T-Rank rank at game time.
t1gscharacterteam1 Gscore as a fraction 0-1; '-' when unrated.
t2gscharacterteam2 Gscore as a fraction 0-1; '-' when unrated.
gamestatscharacterPer-game stat array collapsed to a ';'-joined string.
overtimescharacterOvertime field as Torvik ships it; blank on the captured games.
t1funcharacterTorvik fun/watchability component for team1 (0-1).
t2funcharacterTorvik fun/watchability component for team2 (0-1).
resultscharacterResults blob as Torvik ships it (text).
game_dateDatedate parsed to a Date (null when it does not parse).
yearintegerSeason ending year inferred from game_date (July onward is the next season).

return_parsed=False — the raw CSV response body (str).

Example​

torvik_game_schedule(year=2025)

Last validated n/a.