Lab
Real Calgary data, with the whole pipeline showing.
Three small data products, built the way I’d want a team to build them: tested, documented and observable. Everything runs in your browser, and you can run each pipeline yourself against the live source.
01 · NHL play-by-play
Calgary Flames shot analysis
Every Flames shot attempt since 2021-22, including this season. Where they shoot from, and where goals come from.
- games
- 413
- shot attempts
- 50K
- tests pass
- 9/9
Standout: Shot-level goals reconciled to the official score for every game.
- Shot map on a to-scale rink, with strength and team filters
- Coordinates normalized in SQL so every shooter attacks the same net
- Live runs check the NHL for new games through a locked-down proxy
- NHL API
- dbt
- DuckDB
- Edge proxy
02 · Machine learning
What’s a Calgary home worth?
Every home’s 2026 assessment, and a value model trained in Python. It explains each estimate.
- homes
- 488K
- median error
- 7.2%
- tests pass
- 7/9
Standout: A model card that compares against the obvious baseline, not against nothing.
- Explained estimates: how much community, type, age and lot each add
- Holdout accuracy, feature importance and the learning curve
- Train your own in Python, in your browser, and compare it with production
- XGBoost
- Python
- dbt
- Pyodide
03 · City of Calgary open data
Where Calgary is building
Every building permit since 2015. How many homes were permitted, how long it took, and where.
- permits
- 236K
- tests pass
- 9/12
- refresh
- Weekly
Standout: Incremental loads that catch status changes on old permits as well as new ones.
- Housing units, time to permit and top communities, with a dot map
- Live runs pull only what the City changed since the snapshot
- Warnings surface real source issues, like permits completed before they were issued
- Socrata API
- dbt
- DuckDB
- Airflow
Every lab has the same four parts
01
Ask the data
Plain-English questions. Claude writes the SQL, the site checks it, your browser runs it.
02
Dashboard
Charts that are SQL queries running in DuckDB in your browser. Every one shows its query.
03
Tested pipeline
Bronze, silver and gold layers with data tests and a contract. Refreshed weekly, and runnable live.
04
Telemetry
Every query’s latency, data downloaded, Core Web Vitals and analytics events, as they happen.
How it fits together
From public APIs to your browser. Most of it is static files, so it costs almost nothing to run.
Sources
- City of Calgary: permits, assessments, use codes
- NHL: schedules and play-by-play
Weekly run
- dbt on DuckDB builds raw, cleaned and business-ready layers
- dbt tests and contracts gate the run
- XGBoost retrains the value model after tests pass
Published
- Parquet files and the model, committed
- A manifest of every run
- dbt docs with lineage
In your browser
- Loads only the tables a page needs
- Runs every chart query locally
- Live runs of dbt’s compiled SQL
- Model training in Python, through Pyodide
Ask the data
Your question and the schemas go to Claude. SQL comes back and runs in your browser.
NHL proxy
Two allowed URL shapes, cached at the edge and rate limited.
Analytics
Typed events go to Vercel Analytics. Telemetry stays in your tab.
The details, from the pipeline runner to the AI guardrails, are in how this site is built.