Skip to content

ParallelVoid/nba-daily-analytics

Repository files navigation

NBA Daily Advanced Analytics

This project analyzes daily NBA game data using advanced basketball metrics. It goes beyond the traditional box score to evaluate team efficiency, player contributions, and overall game flow through analytics that are widely used in modern basketball discourse.

Advanced analytics have dominated a lot of online discourse surrounding NBA players the last few years, in particular to MVP level players Shai Gilgeous-Alexander and Nikola Jokic. Beyond the traditional box score, metrics like True Shooting % (TS%), Effective Field Goal % (eFG%), Offensive/Defensive Rating (OffRtg/DefRtg), and Usage/Possession stats help paint a more complete picture of a player’s and team’s impact on the game. This notebook takes daily NBA game data and analyzes it from Team-Level and Player-Level perspectives.

Overview

Advanced analytics are increasingly important in how NBA players and teams are evaluated. Metrics such as True Shooting % (TS%), Effective Field Goal % (eFG%), and Offensive/Defensive Rating (OffRtg/DefRtg) provide deeper insights into performance than raw points, rebounds, and assists.

This project pulls daily NBA data and provides:

  • Team-Level Analysis: Compare efficiency, turnover rates, rebounding, and defensive performance across teams.
  • Player-Level Analysis: Evaluate starters and bench players, highlight top scorers, and identify the most efficient performers.
  • Visualizations: Radar charts, scatter plots, and parallel coordinates plot to make advanced stats easier to interpret.

Features

  • Load game data from JSON (local cache or API).
  • Compute and visualize advanced team statistics.
  • Compute player-level advanced stats (possessions, TS%, eFG%, turnover %, rebound %, etc.).
  • Highlight starters for both teams.

Tech Stack

  • Python 3
  • pandas & numpy – data wrangling
  • matplotlib – data visualization
  • requests / JSON – pulling and caching game data
  • uv – dependency & environment manager

Usage

  1. Clone the repository:
    git clone https://github.com/yourusername/nba-daily-analytics.git
    cd nba-daily-analytics
  2. Sync dependencies and activate:
    uv sync
    source .venv/bin/activate   # Mac/Linux
    .venv\Scripts\activate      # Windows
  3. Run the notebook:
    uv run jupyter lab

Visual Examples:

Radar Chart Scatter Plot Parallel Coordinate

Statistics Analyzed:

  1. Possessions
  2. True Shooting Percentage (TS%)
  3. Effective Field Goal Percentage (eFG%)
  4. Offensive Rating
  5. Defensive Rating
  6. Assist Percentage
  7. Steal Percentage
  8. Block Percentage
  9. Turnover Percentage
  10. Offensive Rebound Percentage

About

Jupyter Notebook of Daily Advance Stats in NBA

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors