// the find
matsonj/nba-monte-carlo
Monte Carlo simulation of the NBA season, leveraging dbt, duckdb and evidence.dev
A Monte Carlo simulation of the NBA (and NFL) season built on dbt, DuckDB, and Evidence.dev, running the full modern data stack on a single machine. It simulates thousands of season outcomes from current standings and team ratings, then publishes the probability distributions as an interactive static site. The target audience is data engineers who want a real end-to-end dbt/DuckDB project to learn from, not just analysts who want NBA predictions.
DuckDB as the compute engine is the right call — running 10,000 season simulations in SQL would be painful on Postgres, and DuckDB's columnar execution makes it tractable. The Makefile interface between pipeline components is clean; you can swap Evidence for Rill or Malloy without touching the transform layer, and the repo actually demonstrates this with multiple visualization options. The devcontainer and Codespaces setup is unusually well done for a side project — one command and it works. Having both dbt and sqlmesh implementations side by side is genuinely useful for anyone evaluating those tools.
The source data is CSV files committed to the repo, which means the pipeline is frozen in time the moment the season data isn't updated — and last push was January 2026, so it's already stale mid-season. The Monte Carlo model uses Elo ratings without accounting for injuries, rest days, or home/away scheduling effects, so the playoff probability numbers look precise but the model is fairly naive. There's no automated data refresh pipeline that actually fetches live scores; the GitHub Actions workflows deploy the site but don't pull new data. The to-do list in the README has been there long enough to be decoration at this point.