Skip to content

PatrickCoop12/nba_shooting_analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€ NBA Shot Selection Evolution (2004–2024)

πŸ“ Overview

This project investigates how NBA shot selection and offensive philosophy have evolved over two decades, contrasting the 2003–04 "Mid-Range Era" with the 2023–24 "Pace-and-Space Era".

Using shot-by-shot data, the analysis quantifies:

  • The decline of the mid-range jumper
  • The exponential rise of the three-point shot, often called the Three-Point Revolution

The deliverables include a series of comparative visualizations (e.g., Shot Density Maps, Shot Distance Histograms) illustrating the shift in offensive geometry across eras.


πŸ“Š Dataset Details

The analysis compares two full NBA seasons with consistent shot log structures to ensure valid comparison.

Feature 2003–04 Season Data 2023–24 Season Data (Expected)
Source Kaggle: NBA_2004_Shots.csv (via shots.ipynb) Expected via NBA Stats API or public datasets
Shots Included β‰ˆ190,000 shot attempts All available shot attempts
Focus Mid-Range Heavy Era Pace-and-Space Era
Key Columns SHOT_DISTANCE, LOC_X, LOC_Y, SHOT_MADE, SHOT_TYPE Equivalent columns required

πŸ”‘ Critical Features for Trend Analysis

  • SHOT_DISTANCE β€” enables frequency distributions by range (ft)
  • SHOT_TYPE β€” categorizes attempts (2PT vs. 3PT)
  • SHOT_MADE β€” supports efficiency metrics (FG%, eFG%)
  • LOC_X / LOC_Y β€” used to generate shot density maps

πŸ› οΈ Setup & Installation

Dependencies

Install the required Python packages:

pip install pandas numpy matplotlib seaborn kaggle

πŸ’‘ Data Implications and Analysis Findings

The data analysis reveals a fundamental change in the geometry and philosophy of NBA offense, driven by the analytical understanding of Expected Value (EV).

Since a three-point shot is worth 50% more than a two-point shot, teams have optimized their offense to target only the two most efficient shot locations β€” at the rim and beyond the arc β€” while eliminating the low-EV mid-range shot.


πŸ“‰ Key Comparative Trends (2004 vs. 2024)

Trend 2003–04 Season (Baseline) 2023–24 Season (Modern Era) Analytical Implication
πŸ€ Shot Profile Mid-Range Heavy. Significant shot volume taken from 10–20 feet. Three-and-Rim. Shots are heavily concentrated at the rim (0–4 ft) and beyond the arc (22+ ft). The Death of Mid-Range: The mid-range jump shot has been deemed analytically inefficient and has been nearly eradicated from high-volume offense.
🎯 3-Point Attempts League average 3PA per game β‰ˆ 15–16 attempts. 3PA has approximately doubled or more (β‰ˆ 35+ attempts per game). Increased Pace & Value: The league prioritizes the Expected Value (EV) of a shot β€” with a league-average three-pointer yielding β‰ˆ 1.10 points per attempt, often higher than a contested mid-range two-pointer.
πŸ”„ Player Roles More defined positional roles (e.g., Centers primarily near the basket). All players, including Centers and Forwards, are now expected to have 3-point range. Positional Fluidity: The rise of β€œpositionless basketball” β€” every player must be a floor-spacer to maintain offensive efficiency and prevent paint congestion.

πŸ–ΌοΈ Visual Interpretation

Visualization 2003–04 Season 2023–24 Season Insight
Shot Density Map (Shot Chart) High density in the mid-range areas (elbows, baseline corners) and under the basket High density exclusively at the rim and around the full three-point arc, forming a β€œHomer Simpson Donut” shape Clear visual evidence of the mid-range disappearance and the dominance of rim and perimeter shots
Shot Distance Histogram Bimodal or tri-modal distribution with peaks at 0–5 ft (rim), 10–20 ft (mid-range), and a smaller peak at 22+ ft (three-point range) Strong bimodal distribution with peaks at 0–5 ft and 22+ ft, and near-zero frequency in the mid-range zone Quantifies the β€œThree-and-Rim” offensive shift β€” mid-range nearly eliminated

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published