GooglyPlusPlus2021: Towards more picturesque analytics!
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
Analytics for e.g. sports analytics, business analytics or analytics in e-commerce or in other domain has 2 main requirements namely a) What kind of analytics (set of parameters,function) will squeeze out the most intelligence from the data b) How to represent the analytics so that an expert can garner maximum insight?
While it may appear that the former is more important, the latter is also equally, if not, more vital to the problem. Indeed, a picture is worth a thousand words, and often times is more insightful than a large table of numbers. However, in the case of sports analytics, for e.g. in cricket a batting or bowling scorecard captures more information and can never be represented in chart.
So, my Shiny app GooglyPlusPlus includes both charts and tables for different aspects of the analysis. In this post, a newer type of chart, popular among senior management experts, namely the 4 quadrant graph is introduced, which helps in categorising batsmen and bowlers into 4 categories as shown below
a) Batting Performances – Top right quadrant (High runs, High Strike rate)
b) Bowling Performances – Bottom right quadrant( High wickets, Low Economy Rate)
I have added the following 32 functions in this latest version of GooglyPlusPlus
A. Match Tab
All the functions below are at match level
- Team Runs vs SR Plot
- Team Wickets vs ER Plot
- Team Runs vs SR Power play plot
- Team Runs vs SR Middle overs plot
- Team Runs vs SR Death overs plot
- Team Wickets vs ER Power Play
- Team Wickets vs ER Middle overs
- Team Wickets vs ER Death overs
B. Head-to-head Tab
The below functions are based on all matches between 2 teams’
- Team Runs vs SR Plot all Matches
- Team Wickets vs ER Plot all Matches
- Team Runs vs SR Power play plot all Matches
- Team Runs vs SR Middle overs plot all Matches
- Team Runs vs SR Death overs plot all Matches
- Team Wickets vs ER Power Play plot all Matches
- Team Wickets vs ER Middle overs plot all Matches
- Team Wickets vs ER Death overs plot all Matches
C. Team Performance tab
The below functions are based on a team’s performance against all other teams
- Team Runs vs SR Plot overall
- Team Wickets vs ER Plot overall
- Team Runs vs SR Power play plot overall
- Team Runs vs SR Middle overs plot overall
- Team Runs vs SR Death overs plot overall
- Team Wickets vs ER Power Play overall
- Team Wickets vs ER Middle overs overall
- Team Wickets vs ER Death overs overall
D. T20 format Batting Analysis
This analysis is at T20 format level (IPL, Intl. T20(men), Intl. T20 (women), PSL, CPL etc.)
- Overall Runs vs SR plot
- Overall Runs vs SR Power play plot
- Overall Runs vs SR Middle overs plot
- Overall Runs vs SR Death overs plot
E. T20 Bowling Analysis
This analysis is at T20 format level (IPL, Intl. T20(men), Intl. T20 (women), PSL, CPL etc.)
- Overall Wickets vs ER plot
- Team Wickets vs ER Power Play
- Team Wickets vs ER Middle overs
- Team Wickets vs ER Death overs
These 32 functions have been added to my yorkr package and so all these functions become plug-n-play in my Shiny app GooglyPlusPlus2021 which means that the 32 functions apply across all the nine T20 formats that the app supports i.e. IPL, Intl. T20 (men), Intl. T20 (women), BBL, NTB, PSL, CPL, SSM, WBB.
Hence the multiplicative factor of the new addition is 32 x 9 = 288 additional ways of exploring match, team and player data
The data for GooglyPlusPlus is taken from Cricsheet. My shiny app GooglyPlusPlus2021 is based on my R package yorkr.
You can clone/fork GooglyPlusPlus from Github at gpp2021-10
Check out my app GooglyPlusPlus2021 and analyze batsmen, bowlers, teams, overall performance. The data for all the nine T20 formats have been updated to include the latest data.
Hence, the app is just in time for the IPL mega auction. You should be able to analyse players in IPL, Intl. T20 or in any of the other formats from where they could be drawn and check out their relative standings
I am including some random plots to demonstrate the newly minted functions
Note 1: All plots are interactive. The controls are on the top right. You can hover over data, zoom-in, zoom-out, compare data etc by choosing the appropriate control. To know more about how to use the interactive charts see GooglyPlusPlus2021 is now fully interactive!!!
You can also check my short video on how to navigate interactive charts
Note 2: To know about Powerplay, Middle overs and Death over analysis see my post GooglyPlusPlus2021 now with power play, middle and death over analysis
Note 3: All tabs(except Match tab) now include Date range pickers to focus on the period of interest. See my post GooglyPlusPlus2021 enhanced with drill-down batsman, bowler analytics
I) Match tab
New Zealand vs Australia (2021-11-14)
New Zealand batting, except K Williamson, the rest did not fire as much
For Australia, Warner, Maxwell and Marsh played good knocks to wrest control
II) Head-to-head
a) Wickets vs ER during Power play of Mumbai Indians in all matches against Chennai Super Kings (IPL)
b) Karachi Kings Runs vs SR during middle overs against Multan Sultans (PSL)
c) Wickets vs ER during death overs of Barbados Tridents in all matches against Jamaica Tallawahs (CPL)
III) Teams overall batting performance
India’s best T20 performers in Power play since 2018 (Intl. T20)
e) Australia’s best performers in Death overs since Mar 2017 (Intl. T20)
f) India’s Intl. T20 (women) best Runs vs SR since 2018
g) England’s Intl. T20 (women) best bowlers in Death overs
IV) Overall Batting Performance across T20
This tab gives the batsmen’s rank and overall batting performance across the T20 format.
a) Why was Hardik Pandya chosen, and why this was in error?
Of course, it provides an insight into why Hardik Pandya was chosen in India’s World cup team despite poor performances recently. Here are the best Intl. T20 death over batsmen
Of course, we can zoom in to get a better look
This is further substantiated when we performances in IPL
However, if you move the needle forward a year at a time, you see Hardik Pandya’s performance drops significantly
and further down
Rather, Dinesh Karthik, Sanju Samson or Ruturaj Gaikwad would have been better options
b) Best batsmen Intl. T20 (women) in Power play since 2018
V) Overall bowling performance
This tab gives the bowler’s rank and overall bowling performance in Power play, middle and death overs across all T20 formats
a) Intl. T20 (men) best bowlers in Power Play from 2019 (zoomed in)
b) Intl. T20(men) best bowlers in Death overs since 2019
c) Was B. Kumar a good choice for India team in World cup?
Bhuvi was one of India’s best bowler in Power play only if we go back to the beginning of time
i) From 2008
But if we move forward to 2020 onwards we see Arshdeep Singh or D Chahar would have been a better choice
ii) From 2020 onwards
iii) 2021 onwards
Hence D Chahar & Arshdeep Singh are the natural choice moving forwards for India
iv) T20 Best batsman
If we look at Intl. T20 performances since 2017, Babar Azam leads the pack, however his Strike rate needs to move up.
v) T20 best bowlers
As mentioned above go ahead and give GooglyPlusPlus2021 a spin!!!
You can download/fork the code for the Shiny app from Github at gpp2021-10
Also see
- Introducing QCSimulator: A 5-qubit quantum computing simulator in R
- Deep Learning from first principles in Python, R and Octave – Part 6
- Deconstructing Convolutional Neural Networks with Tensorflow and Keras
- Big Data 6: The T20 Dance of Apache NiFi and yorkpy
- What’s up Watson? Using IBM Watson’s QAAPI with Bluemix, NodeExpress – Part 1
- Sea shells on the seashore
- Practical Machine Learning with R and Python – Part 4
- Benford’s law meets IPL, Intl. T20 and ODI cricket
- Video presentation on Machine Learning, Data Science, NLP and Big Data – Part 1
- How to program – Some essential tips
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.