Data Science2024

Shipped

IPL Analysis — 15 Seasons of Cricket

Ball-by-ball forensics on fifteen IPL seasons: what actually wins T20 cricket matches.

  • Folklore tested with evidence
  • Leakage-safe model evaluation
  • Interfaces designed for fans
Coverage
15 seasons, 2008—2022
Granularity
Every delivery bowled
Views
Interactive plotly EDA
Models
Leakage-safe baselines

01

Overview

The Indian Premier League is the richest natural experiment in T20 cricket: fifteen seasons, dozens of venues, and every delivery recorded. This project mines the complete 2008-2022 record — match results plus full ball-by-ball data — to answer the questions fans argue about: does winning the toss matter, which venues favor the chase, who are the genuinely consistent performers, and can match outcomes be predicted at all.

02

Problem

Cricket commentary runs on received wisdom — "win the toss, chase at this ground," "form matters." Almost none of it is ever tested. With every ball since 2008 on record, the folklore is checkable; the challenge is shaping two large relational tables into the aggregates that answer each question honestly.

03

Goals

  • Quantify toss impact, venue bias, and chasing vs defending across all fifteen seasons
  • Surface player consistency — strike rates, economy, and impact — rather than raw totals
  • Build baseline predictive models for match outcomes and evaluate them honestly
  • Communicate findings through interactive plotly views, not tables of coefficients

04

Solution

Two Kaggle tables anchor the work: a match-level record and a ball-by-ball log covering 2008-2022. The analysis joins them into per-innings, per-player, and per-venue aggregates, then works through EDA — toss decisions and their conversion to wins, winning-margin distributions, home advantage, and season-over-season team trajectories.

Player analysis separates volume from rate: batting strike rates against balls faced, bowling economy against overs bowled, so short brilliant careers and long steady ones can be compared on the same axes.

Modeling closes the loop with scikit-learn and statsmodels — classification baselines for match winners from pre-match features, evaluated with proper splits to avoid leaking future seasons into the past.

Tooling

Tech stack

  • Python
  • pandas
  • seaborn
  • plotly
  • scikit-learn
  • statsmodels
  • Jupyter

Friction

Challenges

Ball-by-ball data is heavy and messy

Fifteen seasons of deliveries is hundreds of thousands of rows with renamed teams, moved venues, and rule changes across eras. Team-name normalisation and era-aware aggregation had to come before any chart could be trusted.

Prediction without leakage

A naive random split lets the model memorise a season it will be tested on. Splitting chronologically keeps the evaluation honest — and appropriately humbles the accuracy numbers, because T20 is genuinely high-variance.

Takeaways

Lessons learned

  • Most cricket folklore shrinks under aggregation — effects like toss advantage exist but are far smaller and more venue-dependent than commentary implies
  • Rate-vs-volume framing is the fairest way to compare players across eras
  • In high-variance sports, an honest model with modest accuracy teaches more than an overfit one with impressive accuracy

Evidence

Dataset

IPL Complete Dataset (2008—2022)

Kaggle

Match-level results and full ball-by-ball delivery records for every IPL season from 2008 through 2022.

View dataset

Roadmap

Future improvements

  • Live win-probability model updated ball by ball, with its reasoning on display
  • Venue clustering on pitch behavior rather than geography
  • Extend the dataset through the current season

Rebuilt for this site from the original repository — source history