Skip to main content

Men's college basketball — 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
rankInt64T-Rank position (overall barthag rank).
teamStringTorvik team name (the crosswalk join key).
confStringTorvik conference abbreviation (e.g. B12, ACC, BE).
recordStringOverall win-loss record to date.
adjoeFloat64Adjusted offensive efficiency (points per 100 possessions vs an average defense).
oe_rankInt64National rank of adjusted offensive efficiency.
adjdeFloat64Adjusted defensive efficiency (points allowed per 100 possessions vs an average offense).
de_rankInt64National rank of adjusted defensive efficiency.
barthagFloat64Torvik power rating: win probability vs an average team on a neutral floor.
rank_2Int64Barthag rank repeated as shipped in the source CSV (duplicate of rank).
proj_wFloat64Projected full-season wins.
proj_lFloat64Projected full-season losses.
pro_con_wFloat64Projected conference wins.
pro_con_lFloat64Projected conference losses.
con_recStringConference win-loss record to date.
sosFloat64Strength of schedule faced to date.
ncsosFloat64Non-conference strength of schedule.
consosFloat64Conference strength of schedule.
proj_sosFloat64Projected full-season strength of schedule.
proj_noncon_sosFloat64Projected non-conference strength of schedule.
proj_con_sosFloat64Projected conference strength of schedule.
elite_sosFloat64Elite strength of schedule (share of schedule vs elite opponents).
elite_noncon_sosFloat64Elite non-conference strength of schedule.
opp_oeFloat64Average opponent offensive efficiency.
opp_deFloat64Average opponent defensive efficiency.
opp_proj_oeFloat64Projected average opponent offensive efficiency.
opp_proj_deFloat64Projected average opponent defensive efficiency.
con_adj_oeFloat64Adjusted offensive efficiency in conference games only.
con_adj_deFloat64Adjusted defensive efficiency in conference games only.
qual_oFloat64Offensive efficiency vs quality (top-tier) opponents.
qual_dFloat64Defensive efficiency vs quality (top-tier) opponents.
qual_barthagFloat64Barthag computed from the quality-opponent efficiency splits.
qual_gamesFloat64Number of quality games underlying the qual_* splits.
funFloat64Torvik's FUN style/entertainment index.
con_pfFloat64Points scored in conference play.
con_paFloat64Points allowed in conference play.
con_possFloat64Possessions played in conference play.
con_oeFloat64Raw offensive efficiency in conference play.
con_deFloat64Raw defensive efficiency in conference play.
con_sos_remainFloat64Strength of the remaining conference schedule.
conf_win_percentFloat64Conference win percentage.
wabFloat64Wins above bubble (resume quality vs a bubble-level team).
wab_rkInt64National rank of wins above bubble.
fun_rkInt64National rank of the FUN index.
adjtFloat64Adjusted tempo (possessions per 40 minutes).

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

Raises​

ExceptionDescription
sportsdataverse.errors.NoESPNDataErrorThe host answered 404 -- the requested resource does not exist. Barttorvik.com returned 404 (no data file for that season).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty.

Example​

torvik_ratings(year=2025)

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_nameStringTorvik team name.
e_fg_percentFloat64Effective field-goal percentage on offense.
rkInt64National rank of offensive eFG%.
e_fg_percent_defFloat64Effective field-goal percentage allowed on defense.
rk_2Int64National rank of defensive eFG% allowed.
ftrFloat64Free-throw rate on offense (FTA per FGA).
rk_3Int64National rank of offensive free-throw rate.
ftr_defFloat64Free-throw rate allowed on defense.
rk_4Int64National rank of defensive free-throw rate allowed.
or_percentFloat64Offensive rebound percentage.
rk_5Int64National rank of offensive rebound percentage.
dr_percentFloat64Defensive rebound percentage.
rk_6Int64National rank of defensive rebound percentage.
to_percentFloat64Turnover percentage on offense.
rk_7Int64National rank of offensive turnover percentage.
to_percent_defFloat64Turnover percentage forced on defense.
rk_8Int64National rank of defensive turnover percentage forced.
x3p_percentFloat64Three-point percentage on offense.
rk_9Int64National rank of offensive three-point percentage.
x3p_d_percentFloat64Three-point percentage allowed on defense.
rk_10Int64National rank of three-point percentage allowed.
x2p_percentFloat64Two-point percentage on offense.
rk_11Int64National rank of offensive two-point percentage.
x2p_percent_dFloat64Two-point percentage allowed on defense.
rk_12Int64National rank of two-point percentage allowed.
ft_percentFloat64Free-throw percentage.
rk_13Int64National rank of free-throw percentage.
ft_percent_dFloat64Opponent free-throw percentage.
rk_14Int64National rank of opponent free-throw percentage.
x3p_rateFloat64Three-point attempt rate on offense (3PA per FGA).
rk_15Int64National rank of offensive three-point attempt rate.
x3p_rate_dFloat64Three-point attempt rate allowed on defense.
rk_16Int64National rank of three-point attempt rate allowed.
arateFloat64Assist rate on offense (assists per made field goal).
rk_17Int64National rank of offensive assist rate.
arate_dFloat64Assist rate allowed on defense.
rk_18Int64National rank of assist rate allowed.
unnamedFloat64Headerless trailing column shipped in the source CSV (undocumented upstream).
unnamed_2Int64Headerless trailing column shipped in the source CSV (undocumented upstream).
unnamed_3Float64Headerless trailing column shipped in the source CSV (undocumented upstream).
unnamed_4Int64Headerless trailing column shipped in the source CSV (undocumented upstream).

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

Raises​

ExceptionDescription
sportsdataverse.errors.NoESPNDataErrorThe host answered 404 -- the requested resource does not exist. Barttorvik.com returned 404 (no data file for that season).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty.

Example​

torvik_team_factors(year=2025)

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&json=1

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
dateStringGame date as Torvik prints it (m/d/yy).
typeInt64Torvik game-type code (observed 0-3; 1 is the most common); Torvik does not document the codes.
teamStringTorvik team name for the row's team (the perspective of every other column).
confStringTorvik conference abbreviation of the row's team (e.g. B12, ACC).
oppStringTorvik team name of the opponent.
venueStringVenue from the row team's view: H home, A away, N neutral.
resultStringResult from the row team's view, e.g. 'L, 88-57' (W/L, team points, opponent points).
adj_oeFloat64Row team's pre-game adjusted offensive efficiency (points per 100 possessions).
adj_deFloat64Row team's pre-game adjusted defensive efficiency (points allowed per 100 possessions).
oeFloat64Row team's raw offensive efficiency in this game (points per 100 possessions).
off_efgFloat64Row team's offensive effective field-goal percentage in this game.
off_toFloat64Row team's offensive turnover percentage in this game.
off_orFloat64Row team's offensive rebound percentage in this game.
off_ftrFloat64Row team's free-throw rate on offense in this game.
deFloat64Row team's raw defensive efficiency in this game (points allowed per 100 possessions).
def_efgFloat64Opponent's effective field-goal percentage against the row team.
def_toFloat64Opponent's turnover percentage against the row team.
def_orFloat64Opponent's offensive rebound percentage against the row team.
def_ftrFloat64Opponent's free-throw rate against the row team.
game_scoreFloat64Torvik's Gscore, a 0-100 single-game performance rating for the row team.
opp_confStringTorvik conference abbreviation of the opponent.
quadInt64Torvik '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.
yearInt64Season ending year (2025 = the 2024-25 season).
tempoFloat64Possessions per 40 minutes in this game.
muidStringTorvik 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.
coachStringHead coach of the row team.
opp_coachStringHead coach of the opponent.
marginFloat64Signed 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_probFloat64Torvik '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_statsStringJSON-encoded array of raw per-game box-score counts exactly as Torvik ships it; the positional layout is Torvik's and undocumented.
overtimesInt64Torvik '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 decoded JSON response body (the positional-field array).

Raises​

ExceptionDescription
sportsdataverse.errors.NoESPNDataErrorThe host answered 404 -- the requested resource does not exist. Barttorvik.com returned 404 (no data file for that season).
requests.exceptions.RequestExceptionConnection-level failure after dl_utils.download exhausts its retries.
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty.

Example​

torvik_game_stats(year=2025)

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&csv=1

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_nameStringPlayer name as Torvik lists it, 'First Last' (e.g. Robby Carmody).
teamStringTorvik team name the player is listed with (e.g. Le Moyne); matches the ratings team column.
confStringTorvik conference abbreviation.
gamesInt64Games the player appeared in this season.
min_pctFloat64Share of team minutes played, in percent.
o_rtgFloat64Offensive rating (points produced per 100 individual possessions).
usageFloat64Usage rate: share of team possessions used while on the floor, in percent.
e_fgFloat64Effective field-goal percentage.
ts_pctFloat64True shooting percentage.
orb_pctFloat64Offensive rebound percentage.
drb_pctFloat64Defensive rebound percentage.
ast_pctFloat64Assist percentage.
to_pctFloat64Turnover percentage.
ftmFloat64Free throws made.
ftaFloat64Free throws attempted.
ft_pctFloat64Free-throw percentage as a fraction (0-1).
two_pmFloat64Two-point field goals made.
two_paFloat64Two-point field goals attempted.
two_p_pctFloat64Two-point field-goal percentage as a fraction (0-1).
three_pmFloat64Three-point field goals made.
three_paFloat64Three-point field goals attempted.
three_p_pctFloat64Three-point field-goal percentage as a fraction (0-1).
blk_pctFloat64Block percentage.
stl_pctFloat64Steal percentage.
ftrFloat64Free-throw rate (FTA per FGA, in percent).
classStringClass year (Fr, So, Jr, Sr).
heightStringListed height as feet-inches, e.g. 6-4.
numberStringJersey number as listed, as text ("00" is not "0").
porpagFloat64Points over replacement per adjusted game (Torvik's PRPG!).
adj_oeFloat64Player's adjusted offensive efficiency.
pfrFloat64Personal fouls committed per 40 minutes.
yearInt64Season ending year (2025 = the 2024-25 season).
player_idInt64Torvik numeric player id (Int64); the join key to other Torvik player pages.
hometownStringHometown as listed, e.g. 'Mars, PA'; blank for some players.
rec_rankFloat64High-school recruiting rating; null for unranked players.
ast_toFloat64Assist-to-turnover ratio.
rim_madeFloat64Made shots at the rim.
rim_attemptsFloat64Attempted shots at the rim.
mid_madeFloat64Made two-point jump shots (non-rim twos).
mid_attemptsFloat64Attempted two-point jump shots (non-rim twos).
rim_pctFloat64Field-goal percentage at the rim as a fraction (0-1).
mid_pctFloat64Field-goal percentage on non-rim twos as a fraction (0-1).
dunks_madeFloat64Dunks made over the season.
dunks_attemptsFloat64Dunks attempted.
dunks_pctFloat64Dunk percentage as a fraction (0-1).
pickFloat64NBA draft pick number; null for players not drafted.
drtgFloat64Defensive rating (points allowed per 100 individual defensive possessions).
adrtgFloat64Adjusted defensive rating.
dporpagFloat64Defensive points over replacement per adjusted game.
stopsFloat64Defensive stops.
bpmFloat64Box plus/minus.
obpmFloat64Offensive box plus/minus.
dbpmFloat64Defensive box plus/minus.
gbpmFloat64Torvik's game-level box plus/minus.
minutesFloat64Share of team minutes played, in percent (as on the Torvik player page).
ogbpmFloat64Offensive game box plus/minus.
dgbpmFloat64Defensive game box plus/minus.
orebFloat64Offensive rebounds per game.
drebFloat64Defensive rebounds per game.
trebFloat64Total rebounds per game.
astFloat64Assists per game.
stlFloat64Steals per game.
blkFloat64Blocks per game.
ptsFloat64Points per game.
roleStringTorvik's position/role label, e.g. 'Combo G' or 'Scoring PG'.
threatFloat64Torvik's scoring-threat rating.
recruit_dateStringTorvik'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).

Raises​

ExceptionDescription
sportsdataverse.errors.NoESPNDataErrorThe host answered 404 -- the requested resource does not exist. Barttorvik.com returned 404 (no data file for that season).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty.

Example​

torvik_player_stats(year=2025)

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
muidStringTorvik matchup id; equals the game_stats muid.
dateStringGame date as Torvik prints it (m/d/yy).
conmatchStringConference matchup descriptor, e.g. 'D2 at Amer'.
matchupStringRank-annotated matchup text, e.g. '0 Northeastern St. at 243 Tulsa'.
predictionStringPre-game prediction text (favorite, margin, score, win probability).
ttqStringTorvik Thrill Quotient (game excitement).
confStringConference-game flag/code as Torvik ships it (observed 0 and 99).
venueStringVenue / neutral-site flag as Torvik ships it (0 observed on home/away games).
team1StringFirst-listed team name.
t1oeStringteam1 adjusted offensive efficiency going into the game.
t1deStringteam1 adjusted defensive efficiency going into the game.
t1pyStringteam1 pre-game win probability (fraction 0-1).
t1wpStringteam1 win indicator as Torvik ships it (1 when team1 won).
t1proptStringteam1 projected points.
team2StringSecond-listed team name.
t2oeStringteam2 adjusted offensive efficiency going into the game.
t2deStringteam2 adjusted defensive efficiency going into the game.
t2pyStringteam2 pre-game win probability (fraction 0-1).
t2wpStringteam2 win indicator as Torvik ships it (1 when team2 won).
t2proptStringteam2 projected points.
tproStringProjected tempo (possessions) for the game.
t1qualStringTorvik quality marker for team1: the team name when set, blank otherwise.
t2qualStringTorvik quality marker for team2: the team name when set, blank otherwise.
gpStringGame-played flag (1 if completed).
resultStringFinal result text from team1's view; blank until played.
tempoStringActual tempo (possessions per 40 minutes); blank until played.
possessionsStringActual possessions; blank until played.
t1ptsStringteam1 final points; blank until played.
t2ptsStringteam2 final points; blank until played.
winnerStringWinning team name; blank until played.
loserStringLosing team name; blank until played.
t1adjtStringteam1 adjusted tempo.
t2adjtStringteam2 adjusted tempo.
t1adjoStringGame-level adjusted offensive efficiency for team1 as Torvik ships it (0 when unrated).
t1adjdStringGame-level adjusted defensive efficiency for team1 as Torvik ships it (0 when unrated).
t2adjoStringGame-level adjusted offensive efficiency for team2 as Torvik ships it (0 when unrated).
t2adjdStringGame-level adjusted defensive efficiency for team2 as Torvik ships it (0 when unrated).
gamevalueStringTorvik's single-game quality value for the matchup (0 for games between unrated teams).
mismatchStringTorvik's mismatch rating (how lopsided the matchup is).
blowoutStringTorvik's blowout rating.
t1eliteStringTorvik elite-performance component for team1 (0-1).
t2eliteStringTorvik elite-performance component for team2 (0-1).
ord_dateStringProleptic Gregorian ordinal of the game date (Python date.toordinal).
t1pppStringteam1 points per possession in the game.
t2pppStringteam2 points per possession in the game.
gamepppStringCombined points per possession in the game.
t1rkStringteam1 T-Rank rank at game time.
t2rkStringteam2 T-Rank rank at game time.
t1gsStringteam1 Gscore as a fraction 0-1; '-' when unrated.
t2gsStringteam2 Gscore as a fraction 0-1; '-' when unrated.
gamestatsStringPer-game stat array collapsed to a ';'-joined string.
overtimesStringOvertime field as Torvik ships it; blank on the captured games.
t1funStringTorvik fun/watchability component for team1 (0-1).
t2funStringTorvik fun/watchability component for team2 (0-1).
resultsStringResults blob as Torvik ships it (text).
game_dateDatedate parsed to a Date (null when it does not parse).
yearInt64Season ending year inferred from game_date (July onward is the next season).

return_parsed=False — the decoded JSON response body (the positional-field array).

Raises​

ExceptionDescription
sportsdataverse.errors.NoESPNDataErrorThe host answered 404 -- the requested resource does not exist. Barttorvik.com returned 404 (no data file for that season).
requests.exceptions.RequestExceptionConnection-level failure after dl_utils.download exhausts its retries.
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty.

Example​

torvik_game_schedule(year=2025)