Exploring Match stats for IPL using Data visualization : Part 1

SUMEET SAWANT
Analytics Vidhya
4 min readApr 23, 2020

--

As Corona-virus spreads across the world cancelling sporting events including the IPL thereby rendering my Hotstar membership moot .So as a budding data-scientist I decided to substitute IPL window with a Data visualization project of my own . I found the data set of all IPL games from 2008–2019 on Kaggle.

For readers unknown to cricket . Here is Youtube video on IPL and Cricket

The data set contained two csv file

Matches.csv : Information of all matches played in the IPL from 2008–2019 providing the below information

id
season
city
date
team1
team2
toss_winner
toss_decision
result
dl_applied
winner
win_by_runs
win_by_wickets
player_of_match
venue
umpire1
umpire2
umpire3

Deliveries.csv : Information of all balls bowled and it runs scored on it . This data set would be covered in depth in a separate part 2 post.

The data as a whole was clean with few issues . I have document the cleaning portion in my Kaggle notebook . Please feel free to visit or comment on the work .

I explore the data set to get answers to the following questions

  1. Matches played across season 
2. Matches played by each team
3.Matches played in each city
4.Matches played in each stadium
5.Percentage of toss won by each team
6.Decision after toss win Overall
7.Decision after toss season wise
8.Decision after toss team wise
9.Percentage of wins for each team after winning the toss
10.Most common umpire pair across 10 season
11.Most Man-of-Match Wins
12.Function to compute head to head wins between each team
13.100 big wins batting first
14.100 big wins batting second

1.Matches Played across season and Matches played by each team

The higher number of matches in season 2011,2012 and 2013 where due to extra two teams added to the competitions

Also we see that Mumbai Indians have played the most matches

2. Matches Played in City

The reason Mumbai dominates over other city could be as some season semi-final and final are played in Mumbai

Also Mumbai team plays all its matches in one city unlike other teams who re- allocate its home games to different cities

3.Matches Played in Each Stadium

4. Percentage of toss won by each team

Deccan Chargers was quite lucky with respect to tosses

5 Distribution of Decision after winning the toss

Most captains choose to field overall

6.Decision after winning the toss season wise

7. Decision After Toss Team Wise

Most team prefer to chase after toss apart from Pune Warriors ,Deccan Chargers, Chennai Super Kings

8.Percentage of Wins For Each Team After Winning the Toss

The above chart shows that after winning the toss most team go on win at-least 50% for their games . So winning the toss is actually a good habit in IPL.

9.Most Common Umpire Combinations

S. Ravi and Rj Tucker is the most common choice standing in 12 games together.

10. Most Man Of The Match

No doubts here Universe Boss ( Chris Gayle ) bosses over the other.

11.Function to Compute Head-to-Head Wins

The above piece of code which computes the head to head win between two teams . Below is the output from the function

12. Top 100 wins while Batting First and Batting Second across seasons

Season 2010 and 2013 show the higher number of win batting fist which feature in the top 100

Not much to talk in wins by wickets aka batting second

13.Wins Batting Second Between Teams

Hope you guys like my IPL visualization and are able to gain some insights into the tournament . Stay tuned for the part 2 on IPL deliveries data-set.

You can follow / comment on my work on Kaggle or LinkedIn

--

--