Skip to contents

Get the full game-by-game schedule and results for a season from barttorvik.com.

Pulls Bart Torvik's "super schedule" (the {year}_super_sked.json file): one row per game with the pre-game prediction, both teams' adjusted efficiencies and tempo, the final result, and post-game game-quality metrics. No API key is required. Data is available from 2008 to present.

Usage

torvik_game_schedule(year = most_recent_mbb_season())

Arguments

year

(integer required): Season, in 4-digit ending-year format (e.g. 2024). Defaults to most_recent_mbb_season().

Value

A hoopR_data tibble with one row per game (key columns shown; the _1/_2 suffixes denote team1 and team2):

col_nametypesdescription
muidcharacterMatchup unique id.
datecharacterGame date (M/D/YY).
conmatchcharacterConference matchup descriptor.
matchupcharacterRanked-matchup descriptor.
predictioncharacterPre-game prediction (favorite, score, win %).
ttqnumericTorvik Thrill Quotient (game excitement).
confnumericConference-game flag.
venuenumericVenue / neutral-site flag.
team1characterTeam 1 name.
t1oenumericTeam 1 offensive efficiency in the game.
t1denumericTeam 1 defensive efficiency in the game.
team2characterTeam 2 name.
t2oenumericTeam 2 offensive efficiency in the game.
t2denumericTeam 2 defensive efficiency in the game.
gpnumericGame-played flag (1 if completed).
resultcharacterFinal result string.
temponumericGame tempo (possessions).
possessionsnumericPossessions in the game.
t1ptsnumericTeam 1 points.
t2ptsnumericTeam 2 points.
winnercharacterWinning team.
losercharacterLosing team.
gamevaluenumericGame quality value.
t1pppnumericTeam 1 points per possession.
t2pppnumericTeam 2 points per possession.
overtimesnumericNumber of overtimes.
yearintegerSeason (echoes the year argument).

Additional adjusted-efficiency, quality, and ranking columns (t1adjo, t2adjd, t1qual, mismatch, t1rk, ...) are also returned.

Examples

# \donttest{
  try(torvik_game_schedule(year = 2024))
#>  2026-06-13 07:39:15.73635: Invalid arguments or no schedule available for 2024!
#>  Args: year = 2024
#>  Error: lexical error: invalid char in json text.                                        <!DOCTYPE HTML PUBLIC "-//W3C//                      (right here) ------^ 
#> data frame with 0 columns and 0 rows
# }