Skip to main content

Overview

The player statistics collection contains comprehensive player-level data including shooting splits by defender distance, play-by-play totals, shot zone analytics, and advanced shooting metrics. Data covers both regular season and playoff games from 2014 through 2025.

Data Files

Player Shooting

Shooting performance by closest defender distance
  • player_shooting.csv (Regular Season)
  • player_shooting_p.csv (Playoffs)

Shot Zones

Field goal attempts and accuracy by court zone
  • shotzone.csv (Regular Season)
  • shotzone_ps.csv (Playoffs)

Dribble Shots

Shot attempts categorized by dribbles before shot
  • dribbleshots.csv (Regular Season)
  • dribbleshots_ps.csv (Playoffs)

Play-by-Play Totals

Comprehensive per-game statistics
  • pbp_totals.csv (Regular Season)
  • pbp_totals_ps.csv (Playoffs)

Schema: Player Shooting

File: player_shooting.csv / player_shooting_p.csv
Generated by: player_shooting.py
Records: ~100,000+ player-season-shot type combinations

Core Fields

PLAYER_ID
integer
required
NBA.com unique player identifier
PLAYER
string
required
Player name
TEAM
string
required
Team abbreviation (e.g., LAL, BOS, GSW)
year
integer
required
Season ending year (e.g., 2024 for 2023-24 season)
shot_type
string
required
Defender proximity category: very_tight, tight, open, wide_open

Sample Data

PLAYER_ID,PLAYER,TEAM,AGE,GP,G,FREQ%,FGM,FGA,FG%,EFG%,2FG FREQ%,2FGM,2FGA,2FG%,3FG FREQ%,3PM,3PA,3P%,year,shot_type
201933,Blake Griffin,LAC,25.0,80,78,26.5,149,342,43.6,44.9,24.5,140,316,44.3,2.0,9,26,34.6,2014,wide_open
201567,Kevin Love,MIN,25.0,77,75,25.1,159,340,46.8,64.3,4.9,40,66,60.6,20.2,119,274,43.4,2014,wide_open

Schema: Shot Zone Analytics

File: shotzone.csv / shotzone_ps.csv
Records: ~50,000+ player-season records
Name
string
Player name
EntityId
integer
Player ID from PBPStats API
AtRimFGA
integer
Field goal attempts at the rim (< 6 feet)
AtRimFGM
integer
Field goals made at the rim
AtRimAccuracy
float
Shooting percentage at rim (0-1 scale)
ShortMidRangeFGA
integer
Mid-range attempts (short distance)
LongMidRangeFGA
integer
Mid-range attempts (long distance)
Corner3FGA
integer
Corner three-point attempts
Corner3FGM
integer
Corner three-point makes
TsPct
float
True shooting percentage
EfgPct
float
Effective field goal percentage
ShotQualityAvg
float
Average expected points per shot attempt

Schema: Dribble Shots

File: dribbleshots.csv / dribbleshots_ps.csv Shot attempts categorized by number of dribbles taken before the shot (0, 1, 2, 3-6, 7+ dribbles).
dribbles
string
Dribble range: 0, 1, 2, 3-6, 7+
FREQ%
float
Percentage of player’s shots in this dribble range
All other fields follow the same structure as player_shooting.csv.

Schema: Play-by-Play Totals

File: pbp_totals.csv / pbp_totals_ps.csv
Size: 23+ MB (regular season), 7+ MB (playoffs)
Detailed play-by-play aggregated statistics from pbpstats.com API.

Usage Examples

Find Elite Catch-and-Shoot Players (0 Dribbles)

import pandas as pd

df = pd.read_csv('dribbleshots.csv')

# Filter for 0-dribble shots with high volume
elite_catch_shoot = df[
    (df['dribbles'] == '0') & 
    (df['year'] == 2024) &
    (df['3PA'] >= 100)
].sort_values('3P%', ascending=False).head(20)

print(elite_catch_shoot[['PLAYER', 'TEAM', '3PA', '3P%', 'FREQ%']])

Analyze Shot Selection by Defender Distance

import pandas as pd

df = pd.read_csv('player_shooting.csv')

# Compare LeBron's shooting by defender distance in 2024
lebron = df[(df['PLAYER'] == 'LeBron James') & (df['year'] == 2024)]

print(lebron[['shot_type', 'FGA', 'FG%', 'EFG%', 'FREQ%']])

Shot Zone Analysis

import pandas as pd

df = pd.read_csv('shotzone.csv')

# Find best rim finishers (min 200 attempts)
best_rim = df[
    (df['year'] == 2024) & 
    (df['AtRimFGA'] >= 200)
].sort_values('AtRimAccuracy', ascending=False).head(20)

print(best_rim[['Name', 'AtRimFGA', 'AtRimAccuracy', 'TsPct']])

Data Collection Scripts

player_shooting.py

Scrapes NBA.com stats API for shooting data by defender distance

scrape_shooting.py

Additional shooting data collection utilities

Notes

  • Files with _ps or _p suffix contain playoff data
  • Percentage fields (FREQ%, FG%, etc.) are on 0-100 scale in CSV files
  • Data spans 2014-2025 seasons
  • Some 2025 data may be incomplete depending on collection date
The pbp_totals.csv file is very large (23+ MB). Consider filtering by year or specific players when loading into memory.

Build docs developers (and LLMs) love