Selected work / Case study
Kasarani Ticket Ledger
Matching the tickets sold against the people inside, so the next big match day has numbers anyone can check.
In progress. This page updates as the project grows.

- Status
- In progress
- Started
- November 2026
- Stack
- Python 3.12, PostgreSQL 17, dbt Core, Streamlit, Git
- Code
- GitHub ↗
- See it
- The match day in 3D ↗
Progress
- 00Setting up the workshop IN PROGRESSThe machine, the repository and the tools, checked and ready before the first line of real code.READ THE WRITE-UP →
- 01Match day generator PlannedA Python generator that creates a realistic match day of orders, payments, tickets and gate scans, built on the real reported numbers.
- 02Raw layer PlannedPostgreSQL tables that store those events exactly as they were produced.
- 03Ticket ledger and reconciliation PlannedA dbt project that turns the raw events into a trusted ticket ledger, a capacity history and a reconciliation report.
- 04Dashboard PlannedA Streamlit dashboard that shows fans, organisers and gate staff what's really happening. The first version is due 20 December 2026.
- 05Streaming PlannedThe streaming version with Kafka and Spark, in April and May 2027.
The problem
At CHAN 2024, about 25,000 tickets were scanned at Kasarani for Kenya v Morocco. Organisers estimated about 75,000 people got in. Nobody could show how many seats were on public sale or who bought how many. Nobody could match the tickets sold against the people inside.
What the first version answers
The first version answers those questions with data. It's a batch pipeline in four stages:
- A generator written in Python creates a realistic match day: orders, payments, tickets and gate scans. It's built on the real reported numbers.
- A raw layer in PostgreSQL stores those events exactly as they were produced.
- A dbt project turns the raw events into a trusted ticket ledger, a capacity history and a reconciliation report.
- A dashboard in Streamlit shows fans, organisers and gate staff what's really happening.
The streaming version with Kafka and Spark comes later, in April and May 2027.
See the match day
Open the match day in 3D. Switch between a match day with no pipeline and one with it, follow a fan through the gates, or take the cinematic tour.
Follow along
Each stage gets its own write-up in the Build Log as it's finished. This page updates as the project grows.