About cricstat

How I built cricstat

A cricket fan's question, answered with open data, measured models and an honest AI analyst. Part of pandyaHomeLab.

The story

2 April 2011, the Wankhede. Dhoni finished it with a six, and India were world champions again, 28 years after Kapil Dev's team lifted the trophy at Lord's in 1983. Then came the picture that stayed with me: the team carrying Sachin Tendulkar around the ground on their shoulders, and a 22-year-old Virat Kohli saying Sachin had carried the nation for 21 years, so it was time they carried him.

19 November 2023, Ahmedabad. Ten wins in a row, a billion people expecting the trophy, and Australia won the final by six wickets. That night still hurts. It left me, and the whole country, waiting.

2027, South Africa, Zimbabwe and Namibia. It may well be Kohli's last ODI World Cup. My hope is simple: that this time Shubman Gill and his team, after winning the World Cup, lift Kohli onto their shoulders, the way Kohli once lifted Sachin after winning the World Cup.

That hope is why I built cricstat — and exactly why the model must not share it. The forecast is identical for every team. Following India changes what you see first, never the numbers.

The headline: ODI World Cup 2027 predictor

What are the chances of India lifting the 2027 ODI World Cup? Three models compete to answer it, and the comparison is published:

  • Elo + Monte Carlo — A rating for every team, updated after each match, then the tournament simulated thousands of times. The honest baseline; it ships first.
  • Machine-learning challenger — Gradient boosting with squad features: who is actually playing, in form, at home or away.
  • Deep learning with transfer learning — About 2,600 men's ODIs are too few to learn from directly, but 11.6 million deliveries are plenty. A sequence model learns player strength ball by ball, and that learned knowledge is transferred to match and tournament forecasts. The same model gives live in-match win probability.

All three are backtested on the 2019 and 2023 World Cups. The best-calibrated one powers the live forecast: when it says 30%, it should be right about 30% of the time.

Title chances for every team are re-simulated after each new ODI and live through the tournament. Afghanistan men's matches aren't in the source data; the forecast will say how it handles that.

The AI analyst

Ask the Analyst will answer questions in plain words: "How does Kohli score in chases?", "Why did India's chances drop?". It is an LLM agent that calls typed tools over the same stats API, so every number comes from the data, not from the model's memory.

Published research found LLMs answer cricket-statistics questions correctly less than 30% of the time. That is why every answer shows how it was computed, and the analyst's accuracy is measured on a public test set and published.

It explains the forecasts; it does not make them.

How it's built

Open ball-by-ball data flows through a checked pipeline into one serving database. A small read-only API serves every number on these pages, and the models and the analyst plug into the same API.

graph LR
  CS[Cricsheet<br/>ball-by-ball, open data] --> PL[Pipeline<br/>daily refresh + checks]
  PL --> DB[(Serving DB<br/>23k matches · 11.6M balls)]
  DB --> API[Stats API<br/>read-only, every number]
  API --> WEB[These pages<br/>no cookies]
  API -.-> PRED[ODI WC 2027 predictor<br/>Elo · ML · DL]
  API -.-> AGENT[AI analyst<br/>LLM + typed tools]
  PRED -.-> WEB
  AGENT -.-> WEB
Data
2001 → today
Refresh
Daily
Hosting
Home NAS · Docker
Deploys
GitHub → pull-based CD

Honest by design

  • Checked figures — Our numbers for 53 players and 10 teams are cross-checked against published records, and every difference is explained.
  • Gaps disclosed — The data starts in late 2001 (so no 1983), early years are thin, and Afghanistan men's matches are withheld by the source.
  • No sides taken — One model for every team. Forecasts are for education and entertainment, not betting advice.
  • Privacy — No cookies, nothing loaded from third parties, and the team you follow stays in your browser.

Roadmap

  • Now — Player and team statistics for men's and women's cricket, every format and the major leagues.
  • Next — The ODI World Cup 2027 predictor and live win probability, plus India at the ODI World Cups 2003–2023 (earlier editions predate the data).
  • Then — The AI analyst: tools, a public test set, the agent, then a public demo with published evals.
  • After 2027 — T20I team ratings and a T20 World Cup 2028 forecast, once the ODI World Cup 2027 is over.

Built with an AI pair-programmer

Like the rest of pandyaHomeLab, cricstat is built by pair-programming with Claude Code. The questions, the architecture and the judgement are mine; the agent does most of the typing, and every change is reviewed before it ships.

Explore the stats →