Overview
Thedribble.py script collects shooting performance data categorized by the number of dribbles taken before the shot. This provides insight into shot creation ability, isolation scoring, and rhythm shooting patterns.
Data Source
API: NBA.com Stats APIEndpoint:
leaguedashplayerptshot with DribbleRange parameter
Functions
get_dribbleshots()
Retrieves player shooting statistics grouped by dribble count.List of season years to collect (e.g.,
[2023, 2024])Set to
True for playoff data, False for regular season- 0 Dribbles - Catch and shoot immediately
- 1 Dribble - One dribble before shooting
- 2 Dribbles - Two dribbles before shooting
- 3-6 Dribbles - Multiple dribbles, moderate creation
- 7+ Dribbles - Heavy dribbling, high creation difficulty
master_dribble()
Updates master dribble shot files with new season data.Season year to update
Set to
True for playoff dataOutput Files
dribbleshot.csv / dribbleshot_ps.csv
Comprehensive shooting data by dribble count.NBA player ID
Player name
Team abbreviation
Player age during season
Games played
Games started
Frequency of shots in this dribble category (0-100%)
Field goals made
Field goal attempts
Field goal percentage (0-100%)
Effective field goal percentage (0-100%)
Two-point frequency within category
Two-point field goals made
Two-point attempts
Two-point percentage
Three-point frequency within category
Three-pointers made
Three-point attempts
Three-point percentage
Dribble category: “0”, “1”, “2”, “3_6”, “7+”
Season year
jumpdribble.csv / jumpdribble_ps.csv
Jump shot data filtered by dribble count (subset of dribbleshot focusing on jump shots).Usage Examples
Collect Regular Season Data
Update Master File
Analyze Shot Creation
Compare Efficiency by Dribble Count
Analysis Use Cases
Shot Creation Ability
Identify players who can create their own shot (high 7+ dribble volume and efficiency)
Rhythm Shooting
Find players who shoot better with 1-2 dribbles vs catch-and-shoot
Offensive Role
Understand if a player is primarily a spot-up shooter or isolation scorer
Efficiency Decline
Measure how efficiency drops as dribble count increases
Configuration
Rate Limiting: Includes delays between API requests (see script for timing) Season Format: UsesYYYY-YY format (e.g., “2023-24”)
API Headers: Requires standard NBA.com headers (User-Agent, Host, Referer)
Related Scripts
- player_shooting.py - Shot quality by defender distance
- new_tracking.py - Detailed drives and touches data