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.
Since November 2026 the file has 78 fields: barttorvik appended 11
undocumented fields after the original 67. Those 67 keep their names; any
field after them is returned under its position, v68 to v78.
A file with fewer than 67 fields (2008 and 2009 skip the play-by-play
fields) keeps positional names for every column (v1, v2, ...), since
the documented names cannot be placed reliably.
Usage
torvik_player_stats(year = most_recent_mbb_season())Arguments
- year
(integer required): Season, in 4-digit ending-year format (e.g.
2024). Defaults tomost_recent_mbb_season().
Value
A hoopR_data tibble with one row per player.
Its columns are listed in return_columns
(subset(return_columns, fn == "torvik_player_stats")) and in the searchable
return columns article.
See also
Other Torvik Functions:
torvik_game_schedule(),
torvik_game_stats(),
torvik_ncaa_results(),
torvik_ratings(),
torvik_team_factors()
Examples
# \donttest{
try(torvik_player_stats(year = 2024))
#> ── Bart Torvik player season stats from barttorvik.com ────────── hoopR 3.2.0 ──
#> ℹ Data updated: 2026-11-13 21:18:04 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: mmLJIwro-jNHRAYKE3iOUevKu-Z3E15VlK2VKizHnma259Fpdmlyaw=="
#> 17 "</PRE>"
#> 18 "<ADDRESS>"
#> 19 "</ADDRESS>"
#> 20 "</BODY></HTML>"
# }
