View source: R/torvik_player_stats.R
| torvik_player_stats | R Documentation |
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.
torvik_player_stats(year = most_recent_mbb_season())
year |
(integer required): Season, in 4-digit ending-year format
(e.g. |
A hoopR_data tibble with one row per player (key columns shown):
| col_name | types | description |
| player_name | character | Player name. |
| team | character | Team name. |
| conf | character | Conference abbreviation. |
| games | integer | Games played. |
| min_pct | numeric | Percentage of available minutes played. |
| o_rtg | numeric | Offensive rating (points produced per 100 poss). |
| usage | numeric | Usage rate. |
| e_fg | numeric | Effective field goal percentage. |
| ts_pct | numeric | True shooting percentage. |
| orb_pct | numeric | Offensive rebound percentage. |
| drb_pct | numeric | Defensive rebound percentage. |
| ast_pct | numeric | Assist percentage. |
| to_pct | numeric | Turnover percentage. |
| ft_pct | numeric | Free-throw percentage. |
| two_p_pct | numeric | Two-point field goal percentage. |
| three_p_pct | numeric | Three-point field goal percentage. |
| blk_pct | numeric | Block percentage. |
| stl_pct | numeric | Steal percentage. |
| ftr | numeric | Free-throw rate. |
| class | character | Class (Fr/So/Jr/Sr). |
| height | character | Listed height. |
| porpag | numeric | Points over replacement per adjusted game. |
| adj_oe | numeric | Adjusted offensive efficiency. |
| year | integer | Season (4-digit ending-year). |
| player_id | integer | Bart Torvik player id. |
| hometown | character | Player hometown. |
| bpm | numeric | Box plus/minus. |
| obpm | numeric | Offensive box plus/minus. |
| dbpm | numeric | Defensive box plus/minus. |
| role | character | Bart Torvik player role/position label. |
| pts | numeric | Points 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.
Other Torvik Functions:
torvik_game_schedule(),
torvik_game_stats(),
torvik_ncaa_results(),
torvik_ratings(),
torvik_team_factors()
try(torvik_player_stats(year = 2024))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.