The World Cup is finally here, and instead of just watching, I wanted to see how well a statistical model could keep up with the tournament in real time. So I built one. A live machine-learning predictions dashboard for World Cup 2026 that you can check right now at https://fifa-world-cup-2026.up.railway.app/
Thank you for reading this post, don't forget to subscribe!What It Does
The app ingests live fixture and match data from the football-data.org API and continuously generates predictions using two statistical models working in tandem.
The first is an Elo rating system, which tracks each national team’s strength as a single number that updates after every result. Beat a stronger opponent and you gain a lot. Beat a weaker one and you barely move. It’s the same idea used in chess, and it turns out to work surprisingly well for football.
The second is a Dixon-Coles Poisson model, which takes each team’s attack strength and defensive weakness (learned from 40+ years of international match data) and generates a full probability distribution over every possible scoreline. Not just “Brazil will probably win,” but “here are the ten most likely exact scores, each with a probability.”
These two models feed into an in-play Bayesian updater: as goals and red cards come in during a live match, the pre-match probabilities shift in real time. A goal in the 30th minute completely changes the expected final score distribution.
What You Can See
The dashboard has seven tabs. Upcoming shows the next fixtures with win/draw/loss percentages and a scoreline distribution bar chart for each match. Groups tracks live group standings as results come in. Bracket projects the full knockout draw using model probabilities for matches not yet played. Results is probably the most interesting tab. It compares every finished match against the model’s pre-match prediction, with Brier scores, expected goals error, calibration charts, and an upset leaderboard that ranks the matches where the model was most wrong (Morocco 1-0 Spain energy). Teams lets you drill into any team’s fixtures and form. Elo Ratings shows the ranked bar chart of all 48 teams. Finally, How It Works explains the statistics behind everything in plain language (no maths degree required) with the full UI available in both English and Turkish.
How It’s Built
The stack is deliberately lean. A FastAPI backend trains the model from a historical CSV on startup, seeds a SQLite database, and exposes a JSON API. A Streamlit frontend reads from that API. Both services live on Railway, deployed from the same GitHub repo via a RAILWAY_SERVICE environment variable that routes startup to the right script. The ingestion scheduler polls the football API on a daily quota-aware basis (the free tier gives you 100 calls per day, so every call counts), plus every two minutes during live matches. The whole system was designed to run cheaply enough to sit on a Raspberry Pi.
How the Model Performs
Outcome accuracy and Brier scores are tracked live in the Results tab, so the model is essentially grading itself in public as the tournament progresses. The calibration chart is particularly honest: it shows whether “60% confidence” actually corresponds to 60% win rates. Overconfident models show up immediately as dots below the diagonal.
I’ll keep pushing updates as the tournament progresses. If you want to run it yourself, the code and setup instructions are on GitHub.
