More player analysis with gganimate()
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
This post continues the analysis of IPL and T20 (men) batsmen and bowlers through animated charts. In my last post Analyzing player performance with animated charts! I had used animated horizontal bars to display the totalRuns or totalWickets over a 3 year ‘sliding window’. While that was cool, the only drawback of that animation was the batsman and bowler performance was measured in a single dimension of either total(mean) runs or total(mean) wickets.
I think to fairly describe batsmen and bowlers we need at least the following 2 attributes
- Runs and Strike rate for batsmen and
- Wickets and Economy rate for bowlers
So, I have created new animation charts which use these attributes for batsmen and bowlers.
The animated charts are
- Based on a sliding window of 3 years (Jan 2008- Dec 2010, Jan 2009-Dec 2010,…, Jan 2019-Dec 2021)
- I have taken the top 10 percentile and sometimes the top 5 percentile of batsmen and bowlers to keep the charts more manageable
- The charts are based on gganimate().
Note 1: I tried several options for the animation before settling on this one. The animation may seem a bit jerky but, we can follow the progress of players more easily through the years
Note 2: Some charts may display points, without the corresponding names. I think this may be because the animation tries to create intermediate points between the charts.
Note 3: For fine-grained, but static analysis across different intervals or seasons, checkout my my posts GooglyPlusPlus2021 now with power play, middle and death over analysis and GooglyPlusPlus2021: Towards more picturesque analytics!
The code for the animation can be cloned from Github at animation2. Feel free to modify the parameters for a different animation behavior.
Here are performances of IPL and T20 (men) players. Note all charts are based on a 3 year staggered window. The Top 10 percentile is considered
- Runs vs SR – IPL
We can that Shikhar Dhawan is a top performer for 4 years from 2018-2021. He definitely deserved a slot in the India WC 15 member squad.
2. Wickets vs ER – IPL
Similarly, YS Chahal also deserved a slot in the 15 member sqad
3. Runs vs SR in Power play – IPL
S Dhawan, De Kock & KL Rahul are the best players in Power play
4. Runs vs Strike rate in Middle overs – IPL
Rishabh Pant, Shreyas Iyer,Sanju Samson and KL Rahul are best performers in Middle overs
5.Runs vs SR in Death overs – IPL
It is MS Dhoni all the way, till Hardik Pandya catches up. But H Pandya had poor IPL seasons in 2020, 2021. See my post GooglyPlusPlus2021: Towards more picturesque analytics! for finer analysis
6. Wickets vs ER in Power play – IPL
In the early years B. Kumar led. More recently D Chahar and T Boult
7. Wickets vs ER in Middle overs – IPL
YS Chahal, Rashid Khan, Imran Tahir and Rahul Chahar lead in Middle overs
8. Wickets vs ER in Death overs – IPL
Bumrah & Rabada top performers
9. Runs vs SR – T20 (men)
Babar Azam, PR Stirling, Rohit Sharma, S Dhawan, KL Rahul are best performers in recent times
10. Wickets vs ER – T20 (men)
Wanindu Hasaranga, T Shamsi, Shadab Khan, Rashid Khan, T Boult are best performers in recent times
11. Runs vs SR in Power Play – T20 (men)
PR Stirling, RG Sharma, C Munro, Shikhar Dhawan lead
12. Runs vs SR in Middle overs – T20 (men)
Babar Azam, followed by Kohli, S Dhawan, Rizwan, RG Sharma in recent years
13. Runs vs SR in Death overs – T20 (men)
Shoaib Malik, V Kohli, Mohamed Nabi. Mohammed Rizwan and other top the death overs
14. Wickets vs ER in Power play (T20 men)
TG Southee, Mujeeb Ur Rahman and B Stanlake lead in recent years
15. Wickets vs ER in Middle overs – T20 (men)
Top bowlers are Shadab Khan, T Shamsi, Kuldeep Yadav, YS Chahal and AC Agar
16. Wickets vs ER in Death overs – T20 (men)
Haris Rauf, AJ Tye, Rashid Khan and Chris Jordan excel in death overs
You may also like
- Re-introducing cricketr! : An R package to analyze performances of cricketers
- Cricketr adds team analytics to its repertoire!!!
- Pitching yorkpy … short of good length to IPL – Part 1
- yorkr rocks women’s One Day International (ODI) and International T20!!
- Big Data-5: kNiFi-ing through cricket data with yorkpy
- Using Linear Programming (LP) for optimizing bowling change or batting lineup in T20 cricket
- Introducing cricpy:A python package to analyze performances of cricketers
- Benford’s law meets IPL, Intl. T20 and ODI cricket
- GooglyPlusPlus2021 is now fully interactive!!!
- Sixer – R package cricketr’s new Shiny avatar
To see all posts click Index of posts
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.