Basketball data science
13 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. 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.
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 → · codeplaybyplay study
The 2-for-1 adds a real possession at no shot-quality cost, and ~+0.2 net points a quarter-end, clearly above zero over three NBA seasons.
Read the analysis → · codeelam ending study
The Elam Ending would change the winner of about 3% of games and barely move the leader's odds, while cutting the slowest minutes in basketball: a close game's last two minutes take 10.2 real minutes.
Read the analysis → · codeShooting and offense
What repeats in shooting, who creates the offense, and whether threes go cold in Game 1.
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%.
Read the analysis → · codeheliocentrism study
NBA offenses did not become solar systems: the top creator's per-game share slipped from 31.5% to 30.5% over 30 seasons. By 2026 the WNBA was the more concentrated league.
Read the analysis → · codeplayoff series study
Game 1 three-point accuracy is not worse than the rest of the series (NBA −0.03 points). NBA teams just take fewer threes in Game 1, and the share climbs through Game 7.
Read the analysis → · codePlayer value and contracts
What a player adds to a lineup, whether a contract year changes performance, and whether the mebound is earned.
lineup valuation study
RAPM-family player and lineup value with exact team-total reconstruction and honest error bars.
Read the analysis → · codecontract year study
Role players do a little better in contract years (+0.21 Box Plus/Minus); stars do not (−0.25). The analysis plan was fixed before any outcome was looked at.
Read the analysis → · codemebounds
Angel Reese's “mebound” is measurably earned: she recovers 18-23% of her own missed shots, 3.6-4.5x the WNBA rate, while ranking second in the league in rebounds every season.
Read the analysis → · codeThe draft
What public college stats add to the pick, and whether any franchise provably beats its draft slots.
draft study
On held-out drafts, college box scores add nothing beyond the pick: the scouts already priced them in.
Read the analysis → · codedraft potential by team
OKC leads at +489 Win Shares above slot, but 27 of 30 franchise intervals cross zero: provable draft skill is rare. The era's biggest steal went first overall.
Read the analysis → · interactive viewer · codeMeasurement and data quality
Two cases where the data moved instead of the game: a rule change behind a famous trend, and a clock latency in raw tracking.
jersey height study
The “players are getting shorter” trend is ~75% a 2019 measurement-rule change. The jersey numbers really did shrink: the median nearly halved. The WNBA never had the big-number habit to lose.
Read the analysis → · codetracking study
A 2.5–6s scorer's-table latency fabricates findings if unhandled; the possession join is validated at 97.6%.
Read the analysis → · codeThe layers on top
basketball sql layer
The headline tables re-expressed as DuckDB window-function SQL, reconciled to exactly 0.0 against the polars outputs.
codenba 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 → · codebasketball analysis tools
The glossary/tooltip engine, nba_api shims, cross-study identity tests, and the family-wide check orchestrator.
codeAlso 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