This project analyzes 10 seasons of IPL (Indian Premier League) cricket data to uncover team performance trends and scoring patterns — a fun, highly relatable dataset that's excellent for building an engaging analytics portfolio piece.
ℹ Note
This project uses illustrative sample data for teaching purposes. For a real project, students should source an actual IPL ball-by-ball dataset (widely available on Kaggle).
C3.2 Business Problem
A sports analytics firm wants to identify which teams have historically performed best, and whether scoring patterns across seasons reveal any meaningful trends for broadcasters and fantasy-league platforms.
C3.3 Dataset Description
Column
Description
season
IPL season year
team
Team name
match_result
Win/Loss for each match
first_innings_score
Score posted batting first
venue
Stadium where the match was played
Sample scope: 10 seasons (2016-2025) of match-level summary data.
C3.4 Objectives
Determine which teams have won the most titles historically
Analyze how average first-innings scores have changed across seasons
Identify any long-term scoring trends relevant to broadcasters and fantasy platforms
Summarize findings into a short, engaging sports-analytics report
C3.5 Step-by-Step Solution
Step 1: Load match-level IPL data into Pandas
Step 2: Clean and standardize team names (handle renamed/rebranded teams)
Step 3: Count titles won per team and rank them
Step 4: Calculate average first-innings score per season
Step 5: Visualize both findings with a bar chart and a line chart
Step 6: Summarize insights for a sports-analytics audience
C3.6 Complete Python Code
► ipl_analysis.py
import pandas as pd
import matplotlib.pyplot as plt
# 1. Load data
df = pd.read_csv("ipl_matches.csv")
# 2. Clean team names
df['team'] = df['team'].replace({'Delhi Daredevils': 'Delhi Capitals'})
# 3. Titles won per team
titles = df[df['match_result']=='Final Win'].groupby('team').size().sort_values(ascending=False)
print("Titles Won by Team:\n", titles)
# 4. Average score per season
avg_score_by_season = df.groupby('season')['first_innings_score'].mean()
print("Average 1st Innings Score by Season:\n", avg_score_by_season.round(1))
# 5. Visualize
titles.plot(kind="barh", title="Titles Won by Team")
plt.savefig("titles_chart.png")
C3.7 Expected Output
Output
Titles Won by Team: Mumbai Indians 5 Chennai Super Kings 5 Kolkata Knight Riders 2 Gujarat Titans 1
C3.8 Visualizations
Figure C3.1 — IPL titles won per team (sample data).Figure C3.2 — Average first-innings score trend across 10 seasons.
C3.9 Key Insights
Mumbai Indians and Chennai Super Kings are tied as the most successful franchises historically, each with 5 titles.
Average first-innings scores have steadily climbed from ~162 (2016) to ~188 (2025) — a clear trend toward higher-scoring, more aggressive cricket.
Newer franchises like Gujarat Titans have already broken into the title-winning tier within a few seasons, showing the format rewards strong new-team strategy.
C3.10 Business Recommendations
Fantasy-league platforms should adjust scoring-point baselines upward over time to reflect the rising-score trend, keeping games competitive and rewarding.
Broadcasters can spotlight the Mumbai Indians vs Chennai Super Kings rivalry in marketing, given their shared status as the most successful franchises.
Analysts tracking new franchises (like Gujarat Titans) should study their early tactical choices as a case study for expansion-team success strategies.
✓ Instructor Tip
Sports datasets like this one are a great way to keep less analytically-inclined students engaged — consider offering it as an optional alternate project alongside the business-focused ones.