Inspiration

IPL data is huge, but most dashboards stop at "who scored the most runs". As a data analyst I wanted to answer the questions a team actually asks: who wins the Powerplay, which bowler struggles against which batter, and does the toss really matter? I also wanted anyone to be able to ask those questions in plain English.

What it does

CricketIQ turns IPL 2020–2025 ball-by-ball data (413 matches, 99,147 deliveries, 386 players) into an interactive app with five pages:

  • Overview: season KPIs, standings, scoring trends and top performers
  • Player Profile: any batter or bowler with stat cards, season trends and Powerplay / Middle / Death-over splits
  • Team Intelligence: win % by season and each team's batting vs bowling balance by phase
  • Tactical Lab: batter-vs-bowler matchups, venue tendencies, toss impact and a phase-edge heatmap
  • AI Analyst: ask questions in natural language and get answers grounded in the filtered data

Season, team and role filters apply across the whole app.

How we built it

  • Audited and cleaned the source workbook with Python and pandas, then built analysis-ready tables
  • Built the app with Streamlit and interactive Plotly charts
  • The AI Analyst uses the Groq API. The app builds summary tables from the user's current filters and sends only those to the model, with instructions to answer from that data alone and to say so when the data can't answer
  • Deployed on Streamlit Community Cloud with the API key kept in server-side secrets

Challenges we ran into

  • Super Over deliveries were labelled as Powerplay, which would have distorted phase statistics. We re-tagged and excluded them
  • Franchise renames (Kings XI Punjab to Punjab Kings, Royal Challengers Bangalore to Bengaluru) and duplicate stadium names had to be merged
  • Tied and no-result matches have no recorded winner, so we report them separately instead of guessing
  • Most batter-vs-bowler matchups have very few balls, so we added minimum-ball filters and small-sample warnings
  • Keeping the AI honest: it only sees summary data and is told not to invent anything

Accomplishments that we're proud of

  • Every number reconciles with the source data (for example 140,634 runs and 4,978 wickets across tables)
  • An AI analyst that stays grounded in the data and flags small samples
  • A public app where the API key is never exposed to visitors

What we learned

Data quality work (labels, aliases, missing winners) matters more than any chart, and an AI assistant is far more trustworthy when it is given verified summary tables instead of raw data.

What's next for CricketIQ

  • Add player nationality, bowling style and fielding data for deeper tactical analysis
  • Predict match situations and suggest bowling changes
  • Add 2008–2019 seasons for long-term trends

Data and credits

Ball-by-ball data from Cricsheet. This project describes past performance only and does not make predictions.

Built With

Share this project:

Updates

Submission history