Basketball Data Science All studies Scouting one-pagers GitHub

Basketball data science

Six 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 build on each other deliberately. The first asks the smallest question: did NBA players really get shorter? The famous decline turns out to be mostly a measurement-rule change, a rehearsal for every "the metric moved" conversation that matters. From there the family works up the stack. A full season of play-by-play turns the 2-for-1 debate into a measured trade-off. Seven million frames of raw tracking expose a scorer's-table clock latency that quietly fabricates findings when ignored. Regularized lineup models put honest error bars on player value, then rebuild it from an independent unit of observation to prove the ordering isn't plumbing. A shot-pricing model splits shooting into the skill that repeats and the skill that doesn't, and turns that split into a projection rule that beats naive carry-forward out of sample. And the draft study reports the most useful kind of result, that public college stats add nothing beyond the pick, because knowing the ceiling of public information is itself an edge.

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, every number on no analysis number in any README is typed by hand (findings scripts write them from committed outputs, with drift gates), every number in the narrative pages is machine-verified against those outputs 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.

The studies

46 seasons of rosters

jersey height study

The “players are getting shorter” trend is ~70% a 2019 measurement-rule change.

Read the analysis → · code
Full 2023-24 play-by-play

playbyplay study

The 2-for-1 adds a real possession at no shot-quality cost, and ~+0.2 net points, indistinguishable from zero.

Read the analysis → · code
7.5M frames of raw SportVU

tracking study

A 2.5–6s scorer's-table latency fabricates findings if unhandled; the possession join is validated at 97.6%.

Read the analysis → · code
Every five-man lineup, two seasons

lineup valuation study

RAPM-family player and lineup value with exact team-total reconstruction and honest error bars.

Read the analysis → · code
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%.

Read the analysis → · code
56,781 college player-seasons

draft study

On held-out drafts, college box scores add nothing beyond the pick: the scouts already priced them in.

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