Basketball Data Science GitHub
15 studies · three layers · one discipline

Basketball data science

15 studies and three working layers on public NBA, WNBA, G League, and college data, written as narratives, run as pipelines, and gated like production code.

The studies are grouped by the question they answer: how to play the end of a game, how shots and offense are created, what a player is worth, what can be known about a draft, and whether the measurement itself can be trusted. Start anywhere. Each one stands alone.

One discipline runs through all of it. Every analysis is implemented twice, in R and in Python, and the two must reconcile to numeric tolerance before any finding is written. That gate is not ceremony. It caught a text-versus-numeric sort that corrupted every scoreboard number in the play-by-play study, and a dplyr masking bug that silently degraded a standard-error column while every sum still matched. A few steps run in Python only, and each study's README names them: the tracking study's R starts from the de-duplicated frames, the lineup study builds its stints in Python, and a few source and cross-feed checks have no R version. Results are validated against independent external data before being believed, no analysis number in any README is typed by hand (findings scripts write them from committed outputs, with drift gates), numbers in the narrative pages are bound to exact output cells and rechecked on every check run, and each study states plainly what it cannot claim.

Each card below opens the study as a narrative (the question, the evidence, and the specific figures that carry it), with the full technical write-up one link deeper.

Game strategy and endings

When to shoot, when a lead is safe, and what a different ending would change.

35,492 NBA and 6,469 WNBA games

safe lead study

A double-digit lead entering the fourth is less safe than it was: NBA teams down 10 to 14 won 5.8% of the time in the first five seasons and 10.1% in the last five.

Read the analysis → · code
Play-by-play, three NBA and three WNBA seasons

playbyplay study

The 2-for-1 adds a real possession at a small shot-quality cost, and ~+0.2 net points a quarter-end over three NBA seasons, an association rather than a controlled effect. Holding for the last shot does not measurably lose once the possession start is held fixed.

Read the analysis → · code
4,866 games under a target-score ending

elam ending study

Under TBT settings the Elam Ending barely moves the odds of the team ahead, and the clock-driven endings go away: a close NBA game's last two minutes take a median of 10.2 real minutes. How many winners it would change (about 3% in a replay), this data cannot pin down.

Read the analysis → · code

Shooting and offense

What repeats in shooting, who creates the offense, and whether threes go cold in Game 1.

218,701 shots (+ G League, + WNBA)

shot quality study

Shot selection repeats (r ≈ .9); shot-making half-repeats (r ≈ .6). The EB projection built on that beats naive carry-forward by ~10%, though plain shrinkage of raw points per shot ties it.

Read the analysis → · code
35,492 NBA and 6,469 WNBA games

heliocentrism study

NBA offenses did not become solar systems: the top creator's per-game share went from 31.5% to 30.5% over 30 seasons, a fall not distinguishable from zero. The WNBA was the more concentrated league in 2026 alone.

Read the analysis → · code
Every NBA and WNBA playoff series

playoff series study

Game 1 three-point accuracy is not worse than the rest of the series (NBA −0.03 points). NBA teams take a smaller share of their shots from three in Game 1, and part of that gap comes from Game 1's lower free-throw rate.

Read the analysis → · code

Player value and contracts

What a player adds to a lineup, whether a contract year changes performance, and whether the mebound is earned.

Every five-man lineup, two seasons

lineup valuation study

Player and lineup value from a teammates-only lineup ridge, checked against an opponent-adjusted stint model in both seasons, with intervals that show how little one season can separate.

Read the analysis → · code
NBA contract years, 1999-00 to 2025-26

contract year study

Role players do a little better in contract years in the main comparison (+0.21 Box Plus/Minus), but not among veteran contracts; stars do not (−0.25).

Read the analysis → · code
2M play-by-play events, WNBA × NBA

mebounds

Angel Reese's “mebound” holds up over her career: 132 mebounds, 11.9% of her rebounds (95% interval 9.9% to 13.8%), about three times the WNBA rate on missed twos. Her single-season leads are less certain.

Read the analysis → · code

The draft

What public college stats add to the pick, and whether any franchise provably beats its draft slots.

56,781 college player-seasons

draft study

On held-out drafts, college box scores show no detectable gain over the pick.

Read the analysis → · code
27 draft classes, priced by slot

draft potential by team

Oklahoma City, with its Seattle years, leads at +489 Win Shares above slot, but 25 of 30 franchise intervals cross zero and none clears it after a multiplicity adjustment: provable draft skill is rare. The era's biggest steal went first overall.

Read the analysis → · interactive viewer · code

Measurement and data quality

Whether a popular stat measures anything new, and two cases where the data moved instead of the game: a rule change behind a famous trend, and a clock latency in raw tracking.

31,197 NBA and 3,880 WNBA games

kills study

Three straight stops tell you little that a defense's stop rate does not, but the count still has a record book: 22 straight scoreless possessions, twice.

Read the analysis → · code
46 seasons of rosters

jersey height study

Most of the “players are getting shorter” trend is one 2019-20 step that the same returning players show: ~75% of the net decline (95% interval 42% to 169%), timed with a league measurement rule. The jersey numbers really did shrink: the median nearly halved. The WNBA never had the big-number habit to lose.

Read the analysis → · code
686,381 frames of raw SportVU

tracking study

A 2.5–6 s per-game clock offset between tracking and play-by-play fabricates findings if unhandled. After calibration the possession join agrees on 97.6% of shots in-sample and 95.9% held out by game.

Read the analysis → · code

Officiating

Which fouls and violations officials call most, and how officials working the same games differ.

35,492 NBA and 6,469 WNBA games

fouls study

Shooting fouls have been the NBA's most called foul every season since 2000-01, and officials differ from their crewmates in the same games by 9.8% (sd) in how many fouls they call.

Read the analysis → · code

The layers on top

SQL layer

basketball sql layer

The headline tables re-expressed as DuckDB window-function SQL, reconciled to exactly 0.0 against the polars outputs.

code
Scouting

nba scouting onepagers

Auto-generated opponent one-pagers for all 30 teams, full 2025-26 season, gated byte-for-byte against the data.

Browse the reports → · code
Tooling

basketball analysis tools

The glossary/tooltip engine, nba_api shims, cross-study identity tests, and the family-wide check orchestrator.

code

Also live

Six seasons of the NBA over/under tracker (2025-26 · 2020-21 and the years between), the NBA Player Finder, NBA / WNBA schedule viewers, and the rest of chester.rbind.io/portfolio.

Standards & references

Glossary · Analysis audit · Data provenance (sources and seasons) · Public-data survey