CoolFace
Datasetpublic

Omerinbar/nba-career-stats-eda

๐Ÿ€ NBA Player Career Stats โ€” EDA Project Overview This project presents an end-to-end Exploratory Data Analysis (EDA) of NBA player career statistics. The goal is to uncover patterns in player performance, compare active vs. retired players, and explore relationships between key basketball stats. Source: Hatman/NBA-Player-Career-Stats Original size: 3,093 rows ร— 28 columns Final clean size: 3,078 rows ร— 23 columns Target Variable: IS_ACTIVE (True = Active /โ€ฆ See the full description on the dataset page: https://huggingface.co/datasets/Omerinbar/nba-career-stats-eda.

sourceHugging Faceupdated 6mo agoView on Hugging Face
0likes159downloads
Dataset Card

๐Ÿ€ NBA Player Career Stats โ€” EDA Project

<video src="https://huggingface.co/datasets/Omerinbar/nba-career-stats-eda/resolve/main/OmerinbarEDA.mp4" controls="controls" style="max-width: 720px;"></video>

Overview

This project presents an end-to-end Exploratory Data Analysis (EDA) of NBA player career statistics. The goal is to uncover patterns in player performance, compare active vs. retired players, and explore relationships between key basketball stats.

  • โ€”Source: Hatman/NBA-Player-Career-Stats
  • โ€”Original size: 3,093 rows ร— 28 columns
  • โ€”Final clean size: 3,078 rows ร— 23 columns
  • โ€”Target Variable: IS_ACTIVE (True = Active / False = Retired)

Features

ColumnDescription
PTSTotal career points
REBTotal rebounds
ASTTotal assists
BLKBlocks
STLSteals
FGA / FGM / FG_PCTField goal attempts, made, percentage
FG3A / FG3M / FG3_PCT3-point attempts, made, percentage
FTA / FTM / FT_PCTFree throw attempts, made, percentage
GPGames played
MINMinutes played
IS_ACTIVETrue if currently active, False if retired

Data Cleaning

Steps performed:

  • โ€”Checked for missing values โ†’ none found
  • โ€”Dropped duplicate rows โ†’ 15 duplicates
  • โ€”Dropped redundant columns (FULLNAMELOWER, FIRSTNAMELOWER, LASTNAMELOWER, FIRSTNAME, LASTNAME)
  • โ€”Final clean dataset: 3,078 rows ร— 23 columns

Outlier Detection

  • โ€”Used box plots on key stats: PTS, REB, AST
  • โ€”High-value outliers found in all three columns
  • โ€”Decision: retained all outliers โ€” these represent the greatest players in NBA history (e.g., Kareem Abdul-Jabbar for points, John Stockton for assists). Removing them would erase the most interesting cases in the dataset.

Research Question

Can we predict whether a player is Active or Retired based on their career shooting profile?


Visualizations & Key Findings

Q1: Do active players attempt more 3-pointers than retired players?

Finding: Active players attempt nearly 3x more 3-pointers than retired players (110.79 vs. 39.50). This confirms that the 3-point shot has become a defining feature of the modern NBA.

Bar chart

Q2: How does total points distribution differ between active and retired players?

Finding: Active players tend to score more total career points than retired players, with a higher median and wider spread. This reflects the higher-scoring nature of the modern NBA era.

Box plot

Q3: Is there a relationship between 3-point attempts and total points?

Finding: There is a strong positive relationship between 3-point attempts and total career points. Active players (blue) are concentrated at higher FG3A values, confirming the 3-point revolution in the modern NBA.

Scatter plot

Q4: How are the numeric features correlated with each other?

Key correlations:

  • โ€”FGA โ†” PTS: 0.99 (strongest)
  • โ€”MIN โ†” PTS: 0.97
  • โ€”FGA โ†” MIN: 0.96
  • โ€”FG3_PCT โ†” BLK: -0.05 (no correlation โ€” shooting and rim protection are different skills)

heatmap


Summary & Conclusions

This EDA explored the career statistics of 3,078 NBA players to answer the question: Can we predict whether a player is Active or Retired based on their shooting profile?

The data strongly suggests the answer is yes:

  • โ€”Active players attempt nearly 3x more 3-pointers than retired players (110.79 vs. 39.50), reflecting the 3-point revolution that has transformed the modern NBA.
  • โ€”Active players score more total career points on average (393.98 vs. 260.83), consistent with the faster pace and higher scoring of today's game.
  • โ€”There is a strong positive relationship between 3-point attempts and total points scored.
  • โ€”Volume stats like PTS, FGA, and MIN are highly correlated (up to 0.99), since they all depend on how much a player actually plays.

Overall, shooting profile โ€” especially 3-point volume โ€” is a strong indicator of whether a player belongs to the modern era of basketball.

Tools & Technologies

  • โ€”Python (Pandas, NumPy)
  • โ€”Data Visualization (Matplotlib, Seaborn)
  • โ€”Google Colab
  • โ€”HuggingFace Datasets

AI Usage

This project was completed with the assistance of Claude AI (Anthropic) for code guidance, explanations, and analysis support.

Author

Omer Inbar โ€” Reichman University.