nba_games <- read_csv(
"https://bcdanl.github.io/data/nba_games.csv",
col_types = cols(game_id = col_character(),
source_game_id = col_character())
)Basketball
Explore the data on a map
Explore the project data by location. Select a location for details.
Loading the map…
Data
On-page tables preview a sample. Each download contains previous and current seasons in one CSV at a consistent unit of observation. Updated October 6, 2026.
nba_games: 9,840 team-game rows from the completed 2022–23 through 2025–26 regular seasons.nba_teams: 120 team-season rows over those same four seasons.nba_players: 2,262 player-season rows over those same four seasons.nba_salaries: 12,876 ESPN salary listings from 1999–2000 through the upcoming 2026–27 season; historical coverage varies.
season_end_year is the year in which the season ends: 2026 means 2025–26. season supplies the display label. Use these fields when filtering or joining. The upcoming 2026–27 salary records have no matching completed performance season yet.
Team game logs
Each game has two rows, one for each team. The key is season_end_year, game_id, and team_id. The common game_id combines the date and alphabetically ordered team abbreviations, including neutral-site games. source_game_id preserves the original NBA.com or Basketball Reference identifier; source identifies its provider. team_id uses NBA team IDs across all seasons, and team_abbreviation and opponent_abbreviation use the same abbreviations throughout.
| Variables | Meaning |
|---|---|
game_date, matchup, wl |
Date, source matchup label, and win/loss |
is_home, is_neutral_site |
Home indicator; home is missing for neutral-site games |
min |
Total team player-minutes, normally 240; overtime adds minutes |
fgm, fga, fg3m, fg3a, ftm, fta |
Field-goal, three-point, and free-throw makes and attempts |
fg_pct, fg3_pct, ft_pct |
Source shooting rates on a 0–1 scale |
oreb, dreb, reb |
Offensive, defensive, and total rebounds |
ast, stl, blk, tov, pf |
Assists, steals, blocks, turnovers, and personal fouls |
pts, opponent_points, plus_minus |
Team points, opposing points, and point margin |
efg_pct |
(fgm + 0.5 * fg3m) / fga |
ts_pct |
pts / (2 * (fga + 0.44 * fta)) |
fta_rate |
fta / fga |
The three derived rates use the same formulas for every season. Counting statistics are game totals. Rates use decimals, so 0.50 means 50%.
The nba_com_ columns preserve the older NBA.com advanced and four-factor measures, including ratings, pace, possessions, rebounding rates, opponent factors, and nba_com_tpp (turnovers divided by possessions). They cover 2022–23 through 2024–25 and are missing in 2025–26 because that API did not respond. Their formulas differ from Basketball Reference’s team-season measures. Use the common box-score columns for comparisons across all four seasons. The redundant city/team-name and video-availability fields were dropped.
Within these historical fields, offensive/defensive/net ratings are points per 100 possessions, e_ identifies the NBA.com estimated version, and pace is possessions per 48 minutes (pace_per40 uses 40 minutes). ast_tov is assists per turnover and ast_ratio is assists per 100 plays. Shooting, rebounding, assist, opponent-turnover, usage, and PIE rates are stored as decimals. nba_com_tm_tov_pct and nba_com_e_tm_tov_pct use a 0–100 percentage scale; nba_com_tpp uses turnovers per possession as a decimal. nba_com_opp_fta_rate is opponent free-throw attempts per field-goal attempt.
Team season statistics
nba_teams <- read_csv("https://bcdanl.github.io/data/nba_teams.csv")The key is season_end_year and team_id. Each of the 30 teams played 82 regular-season games in each season. All four years use Basketball Reference’s team statistics, collected using the same table and definitions.
| Variables | Meaning |
|---|---|
wins, losses |
Regular-season record |
age |
Minutes-weighted player age |
margin_of_victory |
Average points scored minus points allowed |
strength_of_schedule, simple_rating_system |
Schedule difficulty and overall rating |
off_rating, def_rating, net_rating |
Points scored/allowed per 100 estimated possessions, and their difference |
pace |
Estimated possessions per 48 minutes |
efg_pct, opp_efg_pct, ts_pct |
Decimal shooting rates |
turnover_percent, opp_turnover_percent |
Turnovers per 100 plays under the source definition |
off_rebound_percent, def_rebound_percent |
Rebounding percentages on a 0–100 scale |
fta_rate, three_point_attempt_rate |
Free-throw/three-point attempts per field-goal attempt |
ftm_per_fga, opp_ftm_per_fga |
Free throws made per field-goal attempt |
These are season-level estimates. They should not be substituted for the older NBA.com game-level measures.
Player season statistics
nba_players <- read_csv("https://bcdanl.github.io/data/nba_players.csv")Each row is one player in one season, identified by season_end_year and the stable Basketball Reference player_id. Players who changed teams use the published aggregate total, and overlapping team-stint rows have been removed. team_abbreviation == "MULTI" marks those players; teams lists their clubs separated by semicolons.
All counting statistics are season totals across all four years. Divide by g to obtain per-game values. g and gs are games and starts; mp is minutes. fg/fga, fg3/fg3a, fg2/fg2a, and ft/fta are shooting makes/attempts. Their _pct columns and efg_pct are decimal rates. orb, drb, and trb are rebounds; ast, stl, blk, tov, pf, and pts are assists, steals, blocks, turnovers, fouls, and points. pos and age are the source position and season age.
salary_usd retains the historical salary values and fills missing values only from an unambiguous same-season ESPN name match. It is an annual listed salary in US dollars. Missing matches remain missing. Removing the overlapping team-stint rows prevents counting a traded player’s salary several times.
ESPN salary history
nba_salaries <- read_csv("https://bcdanl.github.io/data/nba_salaries.csv")Each row is one season’s ESPN listing. rank, player, position, and team are source fields; salary_usd is the listed annual salary. season_end_year and rank uniquely identify a listing. Coverage varies, and the listings may omit contracts. ESPN team labels reflect the salary table snapshot. Salary and performance must be joined using the same season.
Source: ESPN NBA Player Salaries.
Project ideas
- How do shooting efficiency, turnovers, and rebounds explain game outcomes across seasons?
- How does a team’s pace relate to offensive and defensive performance?
- Which players produce the most points or assists per minute, and how do their salaries compare?
- Do salary distributions differ across positions and seasons?
Sources
- NBA.com statistics
- Basketball Reference player totals: 2022–23, 2023–24, 2024–25, 2025–26
- Basketball Reference glossary
- ESPN NBA salaries
