Skip to contents

Get player advanced season statistics from barttorvik.com.

Pulls every player's advanced season stat line for a year (the getadvstats.php CSV export). No API key is required. barttorvik does not publish column headers for this file, so the column names below are mapped from Bart Torvik's standard player advanced-stats layout (consistent from 2010 onward). Data is available from 2008 to present.

Usage

torvik_player_stats(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 player (key columns shown):

col_nametypesdescription
player_namecharacterPlayer name.
teamcharacterTeam name.
confcharacterConference abbreviation.
gamesintegerGames played.
min_pctnumericPercentage of available minutes played.
o_rtgnumericOffensive rating (points produced per 100 poss).
usagenumericUsage rate.
e_fgnumericEffective field goal percentage.
ts_pctnumericTrue shooting percentage.
orb_pctnumericOffensive rebound percentage.
drb_pctnumericDefensive rebound percentage.
ast_pctnumericAssist percentage.
to_pctnumericTurnover percentage.
ft_pctnumericFree-throw percentage.
two_p_pctnumericTwo-point field goal percentage.
three_p_pctnumericThree-point field goal percentage.
blk_pctnumericBlock percentage.
stl_pctnumericSteal percentage.
ftrnumericFree-throw rate.
classcharacterClass (Fr/So/Jr/Sr).
heightcharacterListed height.
porpagnumericPoints over replacement per adjusted game.
adj_oenumericAdjusted offensive efficiency.
yearintegerSeason (4-digit ending-year).
player_idintegerBart Torvik player id.
hometowncharacterPlayer hometown.
bpmnumericBox plus/minus.
obpmnumericOffensive box plus/minus.
dbpmnumericDefensive box plus/minus.
rolecharacterBart Torvik player role/position label.
ptsnumericPoints per game.

Additional made/attempt splits (ftm/fta, two_pm/two_pa, three_pm/three_pa), rim/mid/dunk shooting splits, defensive ratings (drtg, adrtg, stops), and game-box averages (oreb, dreb, ast, stl, blk) are also returned.

Examples

# \donttest{
  try(torvik_player_stats(year = 2024))
#> ── Bart Torvik player season stats from barttorvik.com ────────── hoopR 3.1.0 ──
#>  Data updated: 2026-06-13 07:39:16 UTC
#> # A tibble: 20 × 1
#>    v1                                                                           
#>    <chr>                                                                        
#>  1 "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://w…
#>  2 "<HTML><HEAD><META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=…
#>  3 "<TITLE>ERROR: The request could not be satisfied</TITLE>"                   
#>  4 "</HEAD><BODY>"                                                              
#>  5 "<H1>403 ERROR</H1>"                                                         
#>  6 "<H2>The request could not be satisfied.</H2>"                               
#>  7 "<HR noshade size=\"1px\">"                                                  
#>  8 "Request blocked."                                                           
#>  9 "We can't connect to the server for this app or website at this time. There …
#> 10 "<BR clear=\"all\">"                                                         
#> 11 "If you provide content to customers through CloudFront, you can find steps …
#> 12 "<BR clear=\"all\">"                                                         
#> 13 "<HR noshade size=\"1px\">"                                                  
#> 14 "<PRE>"                                                                      
#> 15 "Generated by cloudfront (CloudFront)"                                       
#> 16 "Request ID: OSFg7C9emHCDHaKJuYvmo-x3s8Ac1kFsAWcmnt3rT5NWFvODnI02rQ=="       
#> 17 "</PRE>"                                                                     
#> 18 "<ADDRESS>"                                                                  
#> 19 "</ADDRESS>"                                                                 
#> 20 "</BODY></HTML>"                                                             
# }