bref_players_stats: *Basketball-Reference Player Season Stats*

View source: R/bref_players_stats.R

bref_players_statsR Documentation

Basketball-Reference Player Season Stats

Description

Get player season statistics from Basketball-Reference.

Scrapes the league-wide player stat table for a season. No API key is required. Choose the stat table with table. Data is available back to the 1947 (BAA) season for most tables.

Basketball-Reference rate-limits aggressive scraping (~20 requests/minute) – space repeated calls with Sys.sleep().

Usage

bref_players_stats(season = most_recent_nba_season(), table = "per_game")

Arguments

season

(integer required): Season, in 4-digit ending-year format (e.g. 2024 for the 2023-24 season). Defaults to most_recent_nba_season().

table

(character optional): Which stat table to return. One of per_game (default), totals, advanced, per_minute (per 36 minutes), or per_poss (per 100 possessions).

Value

A hoopR_data tibble with one row per player (columns vary by table; common identifying columns shown – column names are Basketball-Reference data-stat keys):

col_name types description
ranker integer Row rank.
player character Player name.
age integer Player age on Feb 1 of the season.
team_id character Team abbreviation (TOT for players on >1 team).
pos character Position.
g integer Games played.
gs integer Games started.
mp_per_g numeric Minutes (per_game table) / mp total (totals table).
pts_per_g numeric Points (scaled to the chosen table).
season integer Season (echoes the season argument).

The advanced table adds per, ts_pct, usg_pct, ws, bpm, vorp, etc.; totals/per_minute/per_poss return the same box categories scaled accordingly.

See Also

Other Basketball-Reference Functions: bref_awards(), bref_draft(), bref_injuries(), bref_player_bios(), bref_player_game_log(), bref_standings(), bref_team_roster(), bref_teams_stats()

Examples


  try(bref_players_stats(season = 2024, table = "per_game"))


hoopR documentation built on Aug. 25, 2026, 9:07 a.m.