IPL 2023:GooglyPlusPlus now with by AI/ML models, near real-time analytics!

It is carnival time again as IPL 2023 is underway!! The new GooglyPlusPlus now includes AI/ML models for computing ball-by-ball Win Probability of matches and each individual player’s Win Probability Contribution (WPC). GooglyPlusPlus uses 2 ML models

  • Deep Learning (Tensorflow) – accuracy : 0.8584
  • Logistic Regression (glmnet-tidymodels) : 0.728

Besides, as before, GooglyPlusPlus will also include the usual near real-time analytics with the Shiny app being automatically updated with the previous day’s match data.

Note: The Win Probability Computation can also be done on a live feed of streaming data. Since, I don’t have access to live feeds, the app will show how Win Probability changed during the course of completed matches. For more details on Win Probability and Win Probability Contribution see my posts

GooglyPlusPlus has been also updated with all the latest T20 league’s match data. It includes data from BBL 2022, NTB 2022, CPL 2022, PSL 2023, ICC T20 2022 and now IPL 2023.

GooglyPlusPlus has the following functionality

  • Batsman tab: For detailed analysis of batsmen
  • Bowler tab: For detailed analysis of bowlers
  • Match tab: Analysis of individual matches, plot of Runs vs SR, Wickets vs ER in power play, middle and death overs, Win Probability Analysis of teams and Win Probability Contribution of players
  • Head-to-head tab: Detailed analysis of team-vs-team batting/bowling scorecard, batting, bowling performances, performances in power play, middle and death overs
  • Team performance tab: Analysis of team-vs-all other teams with batting /bowling scorecard, batting, bowling performances, performances in power play, middle and death overs
  • Optimisation tab: Allows one to pit batsmen vs bowlers and vice-versa. This tab also uses integer programming to optimise batting and bowling lineup
  • Batting analysis tab: Ranks batsmen using Runs or SR. Also plots performances of batsmen in power play, middle and death overs and plots them in a 4×4 grid
  • Bowling analysis tab: Ranks bowlers based on Wickets or ER. Also plots performances of bowlers in power play, middle and death overs and plots them in a 4×4 grid

Also note all these tabs and features are available for all T20 formats namely IPL, Intl. T20 (men, women), BBL, NTB, PSL, CPL, SSM.

Important note: It is possible, that at times, the Win Probability (Deep Learning) for some recent IPL matches will give an error. This is because I need to rebuild the models on a daily basis as the matches use player embeddings and there are new players. While I will definitely rebuild the models on weekends and whenever I find time, you may have to bear with this error occasionally.

Note: All charts are interactive, which means that you can hover, zoom-in, zoom-out, pan etc on the charts

The latest avatar of GooglyPlusPlus2023 is based on my R package yorkr with data from Cricsheet.

Check out the latest version of GooglyPlusPlus

Follow me on twitter for daily highlights @tvganesh_85

GooglyPlusPlus can analyse players, matches, teams, rank, compute win probability and much more.

Included below are some random analyses of IPL 2023 matches so far

A) Chennai Super Kings vs Gujarat Titans – 31 Mar 2023

GT won by 5 wickets ( 4 balls remaining)

a) Worm Wicket Chart

b) Ball-by-ball Win Probability (Logistic Regression) (side-by-side)

This model shows that CSK had the upper hand in the 2nd last over, before it changed to GT. More details on Win Probability and Win Probability Contribution in the posts given by the links above.

c) b) Ball-by-ball Win Probability (Logistic Regression) (overlapping)

Here the ball-by-ball win probability is overlapped. CSK and GT both had nearly the same probability of winning in the 2nd last over before GT edges CSK out

B) Punjab Kings vs Rajasthan Royals – 05 Apr 2023

This was a another closely fought match. PBKS won by 5 runs

a) Worm wicket chart

b) Batting partnerships

Shikhar Dhawan scored 86 runs

c) Ball-by-ball Win Probability using Deep Learning (overlapping)

PBKS was generally ahead in the win probability race

d) Batsman Win Probability Contribution

This plot shows how the different batsmen contributed to the Win Probability. We can see that Shikhar Dhawan has a highest win probability. He played a very sensible innings. Also it appears that there is no difference between Prabhsimran Singh and others, though he score 60 runs. This computation is based on when they come to bat and how the win probability changes when they get dismissed, as seen in the 2nd chart

C) Delhi Capitals vs Gujarat Titans – 4 Apr 2023

GT won by 6 wickets (11 balls remaining)

a) Worm wicket chart

b) Runs scored across 20 overs

c) Runs vs SR plot

d) Batting scorecard (Gujarat Titans)

e) Batsman Win Probability Contribution (Gujarat Titans)

Miller has a higher percentage in the Win Contribution than Sai Sudershan who held the innings together.Strange are the ways of the ML models!!

D) Sunrisers Hyderabad vs Lucknow Supergiants ( 7 Apr 2023)

LSG won by 5 wickets (24 balls left). SRH were bamboozled by the pitch while LSG was able to cruise along

a) Worm wicket chart

b) Wickets vs ER plot

c) Wickets across 20 overs

d) Ball-by-ball win probability using Deep Learning (overlapping)

e) Bowler Win Probability Contribution (LSG)

Bishnoi has a higher win probability contribution than Krunal, though he just took 1 wicket to Krunal’s 3 wickets. This is based on how the Win Probability changed at that point in the game.

The above set of plots are just a random sample.

Note: There are 8 tabs each for 9 T20 leagues (BBL, CPL, T20 (men), T20 (women), IPL, PSL, NTB, SSM, WBB). So there are a lot more detailed charts/analses.

Do take GooglyPlusPlus for a test drive!!!

Follow me on twitter @tvganesh_85 for daily highlights of previous day matches

Take a look at some of my other posts

  1. Using Reinforcement Learning to solve Gridworld
  2. Deep Learning from first principles in Python, R and Octave – Part 6
  3. Big Data-4: Webserver log analysis with RDDs, Pyspark, SparkR and SparklyR
  4. Experiments with deblurring using OpenCV
  5. Singularity
  6. Practical Machine Learning with R and Python – Part 6
  7. Pitching yorkpy … short of good length to IPL – Part 1
  8. Analyzing performances of cricketers using cricketr template
  9. Cricpy takes guard for the Twenty20s
  10. Simulating an Edge Shape in Android

To see all posts click Index of posts

GooglyPlusPlus: Computing T20 player’s Win Probability Contribution

In this post, I compute each batsman’s or bowler’s Win Probability Contribution (WPC) in a T20 match. This metric captures by how much the player (batsman or bowler) changed/impacted the Win Probability of the T20 match. For this computation I use my machine learning models, I had created earlier, which predicts the ball-by-ball win probability as the T20 match progresses through the 2 innings of the match.

In the picture snippet below, you can see how the win probability changes ball-by-ball for each batsman for a T20 match between CSK vs LSG- 31 Mar 2022

In my previous posts I had created several Machine Learning models. In order to compute the player’s Win Probability contribution in this post, I have used the following ML models

The batsman’s or bowler’s win probability contribution changes ball-by=ball. The player’s contribution is calculated as the difference in win probability when the batsman faces the 1st ball in his innings and the last ball either when is out or the innings comes to an end. If the difference is +ve the the player has had a positive impact, and likewise for negative contribution. Similarly, for a bowler, it is the win probability when he/she comes into bowl till, the last delivery he/she bowls

Note: The Win Probability Contribution does not have any relation to the how much runs or at what strike rate the batsman scored the runs. Rather the model computes different win probability for each player, based on his/her embedding, the ball in the innings and six other feature vectors like runs, run rate, runsMomentum etc. These values change for every ball as seen in the table above. Also, this is not continuous. The 2 ML models determine the Win Probability for a specific player, ball and the context in the match.

This metric is similar to Win Probability Added (WPA) used in Sabermetrics for baseball. Here is the definition of WPA from Fangraphs “Win Probability Added (WPA) captures the change in Win Expectancy from one plate appearance to the next and credits or debits the player based on how much their action increased their team’s odds of winning.” This article in Fangraphs explains in detail how this computation is done.

In this post I have added 4 new function to my R package yorkr.

  • batsmanWinProbLR – batsman’s win probability contribution based on glmnet (Logistic Regression)
  • bowlerWinProbLR – bowler’s win probability contribution based on glmnet (Logistic Regression)
  • batsmanWinProbDL – batsman’s win probability contribution based on Deep Learning Model
  • bowlerWinProbDL – bowlerWinProbLR – bowler’s win probability contribution based on Deep Learning

Hence there are 4 additional features in GooglyPlusPlus based on the above 4 functions. In addition I have also updated

-winProbLR (overLap) function to include the names of batsman when they come to bat and when they get out or the innings comes to an end, based on Logistic Regression

-winProbDL(overLap) function to include the names of batsman when they come to bat and when they get out based on Deep Learning

Hence there are 6 new features in this version of GooglyPlusPlus.

Note: All these new 6 features are available for all 9 formats of T20 in GooglyPlusPlus namely

a) IPL b) BBL c) NTB d) PSL e) Intl, T20 (men) f) Intl. T20 (women) g) WBB h) CSL i) SSM

Check out the latest version of GooglyPlusPlus at gpp2023-2

Note: The data for GooglyPlusPlus comes from Cricsheet and the Shiny app is based on my R package yorkr

A) Chennai SuperKings vs Delhi Capitals – 04 Oct 2021

To understand Win Probability Contribution better let us look at Chennai Super Kings vs Delhi Capitals match on 04 Oct 2021

This was closely fought match with fortunes swinging wildly. If we take a look at the Worm wicket chart of this match

a) Worm Wicket chartCSK vs DC – 04 Oct 2021

Delhi Capitals finally win the match

b) Win Probability Logistic Regression (side-by-side) – CSK vs DC – 4 Oct 2021

Plotting how win probability changes over the course of the match using Logistic Regression Model

In this match Delhi Capitals won. The batting scorecard of Delhi Capitals

c) Batting Scorecard of Delhi Capitals – CSK vs DC – 4 Oct 2021

d) Win Probability Logistic Regression (Overlapping) – CSK vs DC – 4 Oct 2021

The Win Probability LR (overlapping) shows the probability function of both teams superimposed over one another. The plot includes when a batsman came into to play and when he got out. This is for both teams. This looks a little noisy, but there is a way to selectively display the change in Win Probability for each team. This can be done , by clicking the 3 arrows (orange or blue) from top to bottom. First double-click the team CSK or DC, then click the next 2 items (blue,red or black,grey) Sorry the legends don’t match the colors! 😦

Below we can see how the win probability changed for Delhi Capitals during their innings, as batsmen came into to play. See below

e) Batsman Win Probability contribution:DC – CSK vs DC – 4 Oct 2021

Computing the individual batsman’s Win Contribution and plotting we have. Hetmeyer has a higher Win Probability contribution than Shikhar Dhawan depsite scoring fewer runs

f) Bowler’s Win Probability contribution :CSK – CSK vs DC – 4 Oct 2021

We can also check the Win Probability of the bowlers. So for e.g the CSK bowlers and which bowlers had the most impact. Moeen Ali has the least impact in this match

B) Intl. T20 (men) Australia vs India – 25 Sep 2022

a) Worm wicket chart – Australia vs India – 25 Sep 2022

This was another close match in which India won with the penultimate ball

b) Win Probability based on Deep Learning model (side-by-side) – Australia vs India – 25 Sep 2022

c) Win Probability based on Deep Learning model (overlapping) – Australia vs India – 25 Sep 2022

The plot below shows how the Win Probability of the teams varied across the 20 overs. The 2 Win Probability distributions are superimposed over each other

d) Batsman Win Probability Contribution : IndiaAustralia vs India – 25 Sep 2022

Selectively choosing the India Win Probability plot by double-clicking legend ‘India’ on the right , followed by single click of black, grey legend we have

We see that Kohli, Suryakumar Yadav have good contribution to the Win Probability

e) Plotting the Runs vs Strike Rate:India – Australia vs India – 25 Sep 2022

f) Batsman’s Win Probability Contribution- Australia vs India – 25 Sep 2022

Finally plotting the Batsman’s Win Probability Contribution

Interestingly, Kohli has a greater Win Probability Contribution than SKY, though SKY scored more runs at a better strike rate. As mentioned above, the Win Probability is context dependent and also depends on past performances of the player (batsman, bowler)

Finally let us look at

C) India vs England Intll T20 Women (11 July 2021)

a) Worm wicket chart – India vs England Intl. T20 Women (11 July 2021)

India won this T20 match by 8 runs

b) Win Probability using the Logistic Regression Model – India vs England Intl. T20 Women (11 July 2021)

c) Win Probability with the DL model – India vs England Intl. T20 Women (11 July 2021)

d) Bowler Win Probability Contribution with the LR model India vs England Intl. T20 Women (11 July 2021)

e) Bowler Win Contribution with the DL model India vs England Intl. T20 Women (11 July 2021)

Go ahead and try out the latest version of GooglyPlusPlus

Also see my other posts

  1. Deep Learning from first principles in Python, R and Octave – Part 8
  2. A method to crowd source pothole marking on (Indian) roads
  3. Big Data 7: yorkr waltzes with Apache NiFi
  4. Practical Machine Learning with R and Python – Part 6
  5. Introducing cricpy:A python package to analyze performances of cricketers
  6. Revisiting World Bank data analysis with WDI and gVisMotionChart
  7. Literacy in India – A deepR dive
  8. Cricketr learns new tricks : Performs fine-grained analysis of players
  9. Presentation on “Intelligent Networks, CAMEL protocol, services & applications”
  10. Adventures in LogParser, HTA and charts

To see all posts click Index of posts

Then, Now(IPL 2022), Beyond : Insights from GooglyPlusPlus

IPL 2022 has just concluded and yet again, it is has thrown a lot of promising and potential youngsters in its wake, while established players have fallen! With IPL 2022, we realise that “Sceptre and Crown must tumble down” and that ‘the glories‘ of form and class like everything else are “shadows not substantial things” (Death the Leveller by James Shirley).

So King Kohli had to kneel, and hitman’ himself got hit. Rishabh Pant, Jadeja also had a poor season. On the contrary there were several youngsters who shone like Abhishek Sharma, Tilak Verma, Umran Malik or a Mohsin Khan

This post is about my potential T20 Indian players for the World Cup 2022 and beyond.

The post below includes my own analysis and thoughts. Feel free to try out my Shiny app GooglyPlusPlus and draw your own conclusions.

You can also view the analyais as a youtube video at Insights from GooglyPlusPlus

How often we hear that data by itself is useless, unless we can draw insights from it? This is a prevailing theme in the corporate world and everybody uses all sorts of tools to analyse and subsequently draw insights. Data analysis can be done in many ways as data can be sliced, diced, chopped in a zillion ways. There are many facets and perspectives to analysing data. Creating insights is easy, but arriving at actionable insights is anything but. So, the problem of selecting the best 11 is difficult as there are so many ways to look at the analysis. My Shiny app GooglyPlusPlus based on my R package yorkr can analyse data in several ways namely

  1. Batsman analysis
  2. Bowler analysis
  3. Match analysis
  4. Team vs team analysis
  5. Team vs all teams analysis
  6. Batsman vs bowler and vice versa
  7. Analysis of in 3,4,5 in power play, middle and death overs

GooglyPlusPlus uses my R package yorkr which has ~ 160 functions some which have several options. So, we can say roughly there are ~500 different ways that analysis can be done or in other words we can gather almost roughly 500+ different insights, not to mention that there are so many combinations of head-on matches and one-vs-all matches.

So generating insights or different ways of analysis data alone is not enough. The question is whether we can get a consolidated view from the different insights. In this post, I try to identify the best contenders for the Indian T20 team. This is far more difficult than it looks. Do you select players on past historical performance or do you choose from the newer crop of players, who have excelled in the recent IPL season. I think this boils down the typical situation in any domain. In engineering, we have tradeoffs – processing power vs memory tradeoff, throughput vs latency tradeoff or in the financial domain it is cost vs benefit or risk vs reward tradeoff. For team selection, the quandary is, whether to choose seasoned players with good historical performance but a poor performances in recent times or go with youngsters who have played with great courage and flair in this latest episode of IPL 2022. Hence there is a tradeoff between reliable but below average performance or risky but superlative performances of new players.

For this I base my potential list from

  • Then (past history of batsmen & bowlers) – I have chosen the performance of batsmen and bowlers in the last 3 years. With we can arrive at those who have had reasonably reliable performance for the last 3 years
  • Now (IPL 2022) – Performance in the current season IPL 2022

A. Then (Jan 2020 – May 2022) – Batsmen analysis

In this section I analyse the performances of batsmen and bowlers from Jan 2022 – May 2022. This is done based on ranking, and plots of Runs vs Strike Rate in Power Play, Middle and Death overs

Also I analyse bowlers based on the overall rank from Jan 2022- May 2022. Further more analysis is done on Wickets vs Economy Rate overall and in Power Play, Middle and Death overs

a. Ranks of batsmen (Runs over Strike Rate) : Jan 2020 – May 2022

The top batsmen consistency wise

[KL Rahul, Shikhar Dhawan, Ruturaj Gaikwad, Ishan Kishan, Shubman Gill, Suryakumar Yadav, Sanju Samson, Mayank Agarwal, Prithvi Shaw, Devdutt Padikkal, Nitish Rana, Virat Kohli, Shreyas Iyer, Ambati Rayadu, Rahul Tripathi, Rishabh Pant, Rohit Sharma, Hardik Pandya]

b. Ranks of batsmen (Strike Rate over Runs) : Jan 2020 – May 2022

The most consistent players from the Strike Rate perspective are

The batsmen with best Strike Rate in the last 3 years are

[Dinesh Karthik, Prithvi Shaw, Hardik Pandya, Rishabh Pant, Sanju Samson, Rahul Tripathi, Suryakumar Yadav, Nitish Rana, Mayank Agarwal, Krunal Pandya, MS Dhoni, Shikhar Dhawan, Ishan Kishan, KL Rahul]

c.Best Batsmen Runs vs SR : Jan 2020 – May 2022

The best batsmen should have a reasonable combination of Runs and SR. The best batsmen are

[KL Rahul, Shikhar Dhawan, Ruturaj Gaikwad, Ishan Kishan, Shubman Gill , Sanju Samson, Suryakumar Yadav, Shubman Gill, Mayank Agarwal, Prithvi Shaw, Nitish Rana, Hardik Pandya, Rishabh Pant, Rahul Tripathi,

d. Best batsmen Runs vs SR in Powerplay: Jan 2020 – May 2022

The best players in Power play

The best players in Power play in the last 3 years are

[KL Rahul, Prithvi Shaw, Rohit Sharma, Devdutt Padikkal, Mayank Agarwal, Virat Kohli, Ishan Kishan, Yashashvi Jaiswal, Wriddhiman Saha, Rahul Tripathi, Sanju Samson, Robin Uthappa, Venkatesh Iyer, Nitish Rana,Suryakumar Yadav, Abhishek Sharma Shreyas Iyer ]

e. Best batsmen Runs vs SR in Middleovers: Jan 2020 – May 2022

The most consistent players in the last 3 years in the middle overs are

[KL Rahul, Sanju Samson, Shikhar Dhawan, Rishabh Pant, Nitish Rana, Shreyas Iyer, Shubman Gill, Ishan Kishan, Devdutt Padikkal, Rahul Tripathi, Ruturaj Gaikwad, Shivam Dube, Hardik Pandya]

f. Best batsmen Runs vs SR in Death overs: Jan 2020 – May 2022

The best batsmen in death overs are

[Dinesh Karthik, Ravindra Jadeja, Hardik Pandya, Rahul Tewatia, MS Dhoni, KL Rahul, Rishabh Pant, Suryakumar Yadav, Ambati Rayadu, Virat Kohli, Nitish Rana, Shikhar Dhawan, Ruturaj Gaikwad, Ishan Kishan]

B) Now (IPL 2022) – Batsmen analysis

IPL 2022 just finished and clearly brings out the batsmen who are in great nick. It is always going to be a judgment call of whether to go for ‘old reliable’ or ‘new and awesome’.

a. Ranks of batsmen (Runs over Strike Rate) : IPL 2022

The best batsmen this season in Runs over Strike rate are

The best batsmen are

[KL Rahul, Shikhar Dhawan, Hardik Pandya, Deepak Hooda, Shubman Gill, Rahul Tripathi, Abhishek Sharma, Ishan Kishan, Wriddhiman Saha, Shreyas Iyer, Tilak Verma, Ruturaj Gaikwad, Sanju Samson, Shivam Dube]

b. Ranks of batsmen (Strike Rate over Runs) : IPL 2022

The batsmen with the best strike rate are

[Dinesh Karthik, Rishabh Pant, Rahul Tewathia, Rahul Tripathi, Sanju Samson, R Ashwin, Deepak Hooda, MS Dhoni, Nitish Rana, Riyan Parag, Shreya Iyer]

c.Best Batsmen Runs vs SR :IPL 2022

From an overall performance the following batsmen shone this season

[KL Rahul, Shikhar Dhawan, Shubman Gill, Hardik Pandya, Abhishel Sharma, Deepak Hooda, Rahul Tripathi, Tilak Verma, Shreya Iyer, Nitish Rana, Sanju Samson, Rishabh Pant]

d. Best batsmen Runs vs SR in Powerplay: IPL 2022

Top batsmen in Power play in IPL 2022

[Abhishek Sharma, Shikhar Dhawan, Rohit Sharma, Ishan Kishan, Shubman Gill, Prithvi Shaw, Wriddhiman Saha, Ishan Kishan, KL Rahul, Ruturaj Gaikwad, Virat Kohli, Yashasvi Jaiswal, Mayank Agarwal, Robin Uthappa, Sanju Samson, Nitish Rana]

e. Best batsmen Runs vs SR in Middleovers: IPL 2022

Best batsmen in middle overs in IPL 2022

[Deepak Hooda, Hardik Pandya, Tilak Verma, KL Rahul, Sanju Samson, Rishabh Pant, Shubman Gill, Ambati Rayudu, Suryaprakash Yadav, Shikhar Dhawan, Ruturaj Gaikwad]

f. Best batsmen Runs vs SR in Death overs: IPL 2022

Top batsmen in death overs in IPL 2022

[Dinesh Karthik, Rahul Tewatia, MS Dhoni, KL Rahul, Azar Patel, Washington Sundar, R Ashwin, Hardik Pandya, Ayush Badoni, Shivam Dube, Suryakumar Yadav, Ravindra Jadeja, Sanju Samson]

Overall Batting Performance in season

Kohli peaked in 2016 and from then on it has been a downward slide (see below)

Taking a look at Kohli’s moving average it is clear that he is past his prime and it will take a herculean effort to regain his lost glory

Similarly, Rohit Sharma’s moving average is constantly around ~30 as seen below

The cumulative average of Rohit Sharma is shown below

Comparing KL Rahul, Shikhar Dhawan, Rohit Sharma and V Kohli we see that KL Rahul and Shikhar Dhawan have had a much superior performance in the last 2-3 years. Rohit has averaged about ~25 runs every season.

Comparing the 4 wicket-keeper batsmen Sanju Samson, Rishabh Pant, Ishan Kishan and Dinesh Karthik from 2016

i) Runs over Strike Rate

We see that Pant peaked in 2018 but has not performed as well since. In the last 2 years Sanju Samson and Ishan Kishan have done well

ii) Strike Rate over Runs

For the last couple of seasons Rishabh Pant and Dinesh Kartik top the strike rate over the other 2

Similar analysis can be done other combinations of batsmen

Choosing the best batsmen from the above, my top 5 batsmen would be

  1. KL Rahul
  2. Shikhar Dhawan
  3. Prithvi Shaw, Ruturaj Gaikwad, Ishan Kishan
  4. Sanju Samson, Shreyas Iyer, Shubman Gill, Shivam Dube,
  5. Abhishek Sharma, Tilak Verma, Rahul Tripathi, Suryakumar Yadav, Deepak Hooda
  6. Rishabh Pant, Dinesh Karthik

Personally, I feel Ishan Kishan and Shreyas Iyer are a little tardy while playing express speeds, as compared to Sanju Samson or Rishabh Pant.

If you notice, I have not included both Virat Kohli or Rohit Sharma who have been below par for some time

C. Then (Jan 2020 – May 2022) – Bowler analysis

This section I analyse the performances of bowlers from Jan 2022 – May 2022. This is done based on ranking, and plots of Wickets vs Economy Rate in Power Play, Middle and Death overs

a. Ranks of bowlers (Wickets over Economy Rate) : Jan 2020 – May 2022

The most consistent bowlers Wickets over Economy Rate for the last 3 years are

[YS Chahal, Jasprit Bumrah, Mohammed Dhami, Harshal Patel, Shardul Thakur, Arshdeep Singh, Rahul Chahar, Varun Chakravarthy, Ravi Bishnoi, Prasidh Krishna, R Ashwon, Axar Patel, Mohammed Siraj, Ravindra Jadeja, Krunal Pandya, Rahul Tewatia]

b. Ranks of bowlers (Economy Rate over Wickets) : Jan 2020 – May 2022

The most economical bowlers since 2020 are

[Axar Patel, Krunal Pandya, Jasprit Bumrah, CV Varun, R Ashwin, Ravi Bishnoi, Rahul Chahar, YS Chahal, Ravindra Jadeja, Harshal Patel, Mohammed Shami, Mohammed Siraj, Rahul Tewatia, Arshdeep Singh, Prasidh Krishna, Shardul Thakur]

c.Best Bowlers Wickets vs ER : Jan 2020 – May 2022

The best bowlers Wickets vs ER will be in the bottom right quadrant. The most consistent and reliable bowlers are

[YS Chahal, Jasprit Bumrah, Mohammed Shami, Harshal Patel, CV Arun, Ravi Bishnoi, Rahul Chahar, R Ashwin, Axar Patel]

d. Best bowlers Wickets vs ER in Powerplay: Jan 2020 – May 2022

The best bowlers in Powerplay are

[Mohammed Shami, Deepak Chahar, Mohammed Siraj, Arshdeep Singh, Jasprit Bumrah, Avesh Khan, Mukesh Choudhary, Shardul Thakur, T Natarajan, Bhuvaneshwar Kumar, WashingtonSundar, Shivam Mavi]

e. Best bowlers Wickets vs ER in Middle overs : Jan 2020 – May 2022

The most reliable performers in middle overs from 2020-2022 are

[YS Chahal, Rahul Chahr, Ravi Bishnoi, Harshal Patel, Axar Patel, Jasprit Bumrah, Umran Malik, R Ashwin, Avesh Khan, Shardul Thakur, Kuldeep Yadav]

f. Best bowlers Wickets vs ER in Death overs : Jan 2020 – May 2022

The most reliable bowlers are

[Harshal Patel, Mohammed Shami, Jasprit Bumrah, Arshdeep Singh, T Natarajan, Avesh Khan, Shardul Thakur, Bhuvaneshwar Kumar, Shivam Mavi, YS Chahal, Prasidh Krishna, Mohammed Siraj, Chetan Sakariya]

B) Now (IPL 2022) – Bowler analysis

a. Ranks of bowlers (Wickets over Economy Rate) : IPL 2022

The best bowlers in IPL 2022 when considering Wickets over Economy Rate

[YS Chahal, Umran Malik, Prasidh Krishna, Mohammed Shami, Kuldeep Yadav, Harshal Patel, T Natarajan, Avesh Khan, Shardul Thakur, Mukesh Choudhary, Jasprit Bumrah, Ravi Bishnoi]

a. Ranks of bowlers (Economy Rate over Wickets) : IPL 2022

The most economical bowlers in IPL 2022 are

[Axar Patel, Jasprit Bumrah, Krunal Pandya, Umesh Yadav, Bhuvaneshwar Kumar, Rahul Chahr, Harshal Patel, Arshdeep Singh, R Ashwion, Umran Malik, Kuldeep Yadav, YS Chahal, Mohammed Shami, Avesh Khan, Prasidh Krishna]

c.Best Bowlers Wickets vs ER : IPL 2022

The overall best bowlers in IPL 2022 are

[YS Chahal, Umran Malik, Harshal Patel, Prasidh Krishna, Mohammed Shami, Kuldeep Yadav, Avesh Khan, Jasprit Bumrah, Umesh Yadav, Bhuvaneshwar Kumar, Arshdeep Singh, R Ashwin, Rahul Chahar, Krunal Pandya]

d. Best bowlers Wickets vs ER in Powerplay: IPL 2022

The best bowlers in IPL 2022 in Power play are

[Mukesh Choudhary, Mohammed Shami, Prasidh Krishna, Umesh Yadav, Avesh Khan, Mohsin Khan, T Natarajan, Jasprit Bumrah, Yash Dayal, Mohammed Siraj]

d. Best bowlers Wickets vs ER in Middle overs: IPL 2022

The best bowlers in IPL 2022 during middle overs

The best bowlers are

[YS Chahal, Umran Malik, Kuldeep Yadav, Harshal Patel, Ravi Bishnoi, R Ashwin]

e. Best bowlers Wickets vs ER in Death overs: IPL 2022

The best bowlers in death overs in IPL 2022 are

[T Natarajan, Harshal Patel, Bhuvaneshwar Kumar, Mohammed Shami, Jasprit Bumrah, Shardul Thakur, YS Chahal, Prasidh Krishna, Avesh Khan, Mohsin Khan, Yash Dayal, Umran Malik, Arshdeep Singh]

Typically in a team we would need a combination of 4 bowlers (2 fast & 2 spinner or 3 fast and 1 spinner) with an additional player who is all rounder.

For 4 bowlers we could have

  1. JJ Bumrah
  2. Mohammed Shami, Umran Malik, Bhuvaneshwar Kumar, Umesh Yadav
  3. Arshdeep Singh, Avesh Khan, Mohsin Khan, Harshal Patel
  4. YS Chahal, Ravi Bishnoi, Rahul Chahar, Axar Patel
  5. Ravindra Jadeja, Hardik Pandya, Rahul Tewathia, R Ashwin

i) Performance comparison (Wickets over Economy Rate)

Bumrah had the best season in 2020. He has been doing quite well and has been among the wickets

ii) Performance comparison (Economy Rate over Wickets)

Bumrah has the best Economy Rate

We can do a wicket prediction of bowlers. So for example for Bumrah it is

iii) Performance evaluation (Wickets over Economy Rate)

Harshal Patel followed by Avesh Khan had a good season last year, but Umran Malik pipped them this year (see below)

iv) Performance analysis of spinners

a. Wickets over Economy Rate: 2022

Chahal has the best season followed by Bishnoi and Chahar this season

b) Economy Rate over WIckets

Axar Patel has the best economy rate followed by Rahul Chahar

Conclusion

The above post identified the best candidates for the Indian team in the future and beyond. In my T20 list, I have neither included Virat Kohli or Rohit Sharma. The data in T20 clearly indicates that they have had their days. There is a lot more talent around. The tradeoff is a little risk for a greater potential performance. My list would be

  1. KL Rahul
  2. Shikhar Dhawan
  3. Ruturaj Gaikwad, Prithvi Shaw, Rahul Tripathi
  4. Suryakumar Yadav, Shreyas Iyer, Abhishek Sharma, Deepak Hooda
  5. Sanju Samson (Wicket keeper/captain)/ Rishabh Pant/Dinesh Karthik
  6. Hardik Pandya, Ravindra Jadeja, Rahul Tewathia
  7. Jasprit Bumrah
  8. Mohammed Shami, Bhuvaneshwar Kumar, Umran Malik
  9. Arshdeep Singh, Avesh Khan, Harshal Patel
  10. YS Chahal
  11. Axar Patel, Ravi Bishnoi, Rahul Chahar

You may agree/ disagree with my list. Feel free to do your analysis with GooglyPlusPlus and come to your own conclusions

This analysis is also available on youtube Insights from GooglyPlusPlus

You may also like

  1. Deep Learning from first principles in Python, R and Octave – Part 1
  2. Player Performance Estimation using AI Collaborative Filtering
  3. The mechanics of Convolutional Neural Networks in Tensorflow and Keras
  4. TWS-4: Gossip protocol: Epidemics and rumors to the rescue
  5. Big Data-4: Webserver log analysis with RDDs, Pyspark, SparkR and SparklyR
  6. Programming languages in layman’s language
  7. Practical Machine Learning with R and Python – Part 4
  8. Pitching yorkpy…swinging away from the leg stump to IPL – Part 3
  9. Revisiting World Bank data analysis with WDI and gVisMotionChart
  10. Natural language processing: What would Shakespeare say?

To see all posts click Index of posts


GooglyPlusPlus2021: Towards more picturesque analytics!

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

  1. Team Runs vs SR Plot
  2. Team Wickets vs ER Plot
  3. Team Runs vs SR Power play plot
  4. Team Runs vs SR Middle overs plot
  5. Team Runs vs SR Death overs plot
  6. Team Wickets vs ER Power Play
  7. Team Wickets vs ER Middle overs
  8. Team Wickets vs ER Death overs

B. Head-to-head Tab

The below functions are based on all matches between 2 teams’

  1. Team Runs vs SR Plot all Matches
  2. Team Wickets vs ER Plot all Matches
  3. Team Runs vs SR Power play plot all Matches
  4. Team Runs vs SR Middle overs plot all Matches
  5. Team Runs vs SR Death overs plot all Matches
  6. Team Wickets vs ER Power Play plot all Matches
  7. Team Wickets vs ER Middle overs plot all Matches
  8. 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

  1. Team Runs vs SR Plot overall
  2. Team Wickets vs ER Plot overall
  3. Team Runs vs SR Power play plot overall
  4. Team Runs vs SR Middle overs plot overall
  5. Team Runs vs SR Death overs plot overall
  6. Team Wickets vs ER Power Play overall
  7. Team Wickets vs ER Middle overs overall
  8. 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.)

  1. Overall Runs vs SR plot
  2. Overall Runs vs SR Power play plot
  3. Overall Runs vs SR Middle overs plot
  4. 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.)

  1. Overall Wickets vs ER plot
  2. Team Wickets vs ER Power Play
  3. Team Wickets vs ER Middle overs
  4. 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

  1. Introducing QCSimulator: A 5-qubit quantum computing simulator in R
  2. Deep Learning from first principles in Python, R and Octave – Part 6
  3. Deconstructing Convolutional Neural Networks with Tensorflow and Keras
  4. Big Data 6: The T20 Dance of Apache NiFi and yorkpy
  5. What’s up Watson? Using IBM Watson’s QAAPI with Bluemix, NodeExpress – Part 1
  6. Sea shells on the seashore
  7. Practical Machine Learning with R and Python – Part 4
  8. Benford’s law meets IPL, Intl. T20 and ODI cricket
  9. Video presentation on Machine Learning, Data Science, NLP and Big Data – Part 1
  10. How to program – Some essential tips

To see all posts click Index of posts

GooglyPlusPlus2021 now with power play, middle and death over analysis

This latest edition of GooglyPlusPlus2021 now includes detailed analysis of teams, batsmen and bowlers in power play, middle and death overs. The T20 format is based on 3 phases as each side faces 20 overs.

Power play: Overs: 0 – 6 – No more than 2 players can be outside the 30 yard circle

Middle overs: Overs: 7- 16 – During these overs the batting side tries to consolidate their innings

Death overs: Overs: 16 -20 – During these 5 overs the batting side tries to accelerate the scoring rate, while the bowling side will try to restrict the batsmen against going for big hits

This is shown below

This latest update of GooglyPlusPlus2021 includes the following functions

a) Match tab

  1. teamRunsAcrossOvers
  2. teamSRAcrossOvers
  3. teamWicketsAcrossOvers
  4. teamERAcrossOvers
  5. matchWormWickets

b) Head-to-head tab

  1. teamRunsAcrossOversOppnAllMatches
  2. teamSRAcrossOversOppnAllMatches
  3. teamWicketsAcrossOversOppnAllMatches
  4. teamERAcrossOversOppnAllMatches
  5. topRunsBatsmenAcrossOversOppnAllMatches
  6. topSRBatsmenAcrossOversOppnAllMatches
  7. topWicketsBowlersAcrossOversOppnAllMatches
  8. topERBowlerAcrossOverOppnAllMatches

c) Overall performance tab

  1. teamRunsAcrossOversAllOppnAllMatches
  2. teamSRAcrossOversAllOppnAllMatches
  3. teamWicketsAcrossOversAllOppnAllMatches
  4. teamERAcrossOversAllOppnAllMatches
  5. topRunsBatsmenAcrossOversAllOppnAllMatches
  6. topSRBatsmenAcrossOversAllOppnAllMatches
  7. topWicketsBowlersAcrossOversAllOppnAllMatches
  8. topERBowlerAcrossOverAllOppnAllMatches

Hence a total of 8 + 8 + 5 = 21 functions have been added. These functions can be utilized across all the 9 T20 formats that are supported in GooglyPlusPlus2021 namely

i) IPL ii) Intl. T20 (men) iii) Intl. T20 (women) iv) BBL v) NTB vi) PSL vii) CPL viii) SSM ix) WBB

Hence there are a total of 21 x 9 = 189 new possibilities to explore in GooglyPlusPlus2021

GooglyPlusPlus2021 is based on my R package yorkr and is based on data from Cricsheet. To know how to use GooglyPlusPlus see any of earlier posts GooglyPlusPlus2021 is now fully interactive!!!, GooglyPlusPlus2021 adds new bells and whistles!!, GooglyPlusPlus2021 enhanced with drill-down batsman, bowler analytics

Take GooglyPlusPlus for a spin here GooglyPlusPlus2021

You can clone/fork the code for the Shiny app from Github – gpp2021-9

Included below is a random selection of options from the 189 possibilities mentioned above. Feel free to try out for yourself

A) IPL – CSK vs KKR 2018-04-10

a) Team Runs in power play, middle and death overs

b) Team Strike rate in power play, middle and death overs

B) Intl. T20 (men) – India vs Afghanistan (2021-11-03)

a) Team wickets in power play, middle and death overs

b) Team Economy rate in power play, middle and death overs

C) Intl. T20 (women) Head-to-head : India vs Australia since 2018

a) Team Runs in all matches in power play, middle and death overs

D) PSL Head-to-head strike rate since 2019

a) Team vs team Strike rate : Karachi Kings vs Lahore Qalanders since 2019 in power play, middle and death overs

E) Team overall performance in all matches against all opposition

a) BBL : Brisbane Heats : Team Wickets between 2015 – 2018 in power play, middle and death overs

F) Top Runs and Strike rate Batsman of Mumbai Indians vs Royal Challengers Bangalore since 2018

a) Top runs scorers for Mumbai Indians (MI) in power play, middle and death overs

b) Top strike rate for RCB in power play, middle and death overs

F) Intl. T20 (women) India vs England since 2018

a) Top wicket takers for England in power play, middle and death overs since 2018

b) Top wicket takers for India in power play, middle and death overs since 2018

G) Intl. T20 (men) All time best batsmen and bowlers for India

a) Most runs in power play, middle and death overs

b) Highest strike rate in power play, middle and death overs

H) Match worm wicket chart

In addition to the usual Match worm chart, I have also added a Match Wicket worm chart in the latest version

Note: You can zoom to the area where you would like to focus more

The option of looking at the Match worm chart (without wickets) also exists.

Go ahead take GooglyPlusPlus2021 for a test drive and check out how your favourite players perform in power play, middle and death overs. Click GooglyPlusPlus2021

You can fork/download the app code from Github at gpp2021-9

Hope you have fun with GooglyPlusPlus

You may also like

  1. Using Linear Programming (LP) for optimizing bowling change or batting lineup in T20 cricket
  2. Practical Machine Learning with R and Python – Part 6
  3. Big Data 6: The T20 Dance of Apache NiFi and yorkpy
  4. Understanding Neural Style Transfer with Tensorflow and Keras
  5. Using Reinforcement Learning to solve Gridworld
  6. Exploring Quantum Gate operations with QCSimulator
  7. Experiments with deblurring using OpenCV
  8. Deep Learning from first principles in Python, R and Octave – Part 5
  9. Re-introducing cricketr! : An R package to analyze performances of cricketers
  10. Natural language processing: What would Shakespeare say?

To see all posts click Index of posts

GooglyPlusPlus2021:ICC WC T20:Pavilion-view analytics as-it-happens!

This year 2021, we are witnessing a rare spectacle in the cricketing universe, where IPL playoffs are immediately followed by ICC World Cup T20. Cricket pundits have claimed such a phenomenon occurs once in 127 years! Jokes apart, the World cup T20 is underway and as usual GooglyPlusPlus is ready for the action.

GooglyPlusPlus will provide near-real time analytics, by automatically downloading the latest match data daily, processing and organising the match data into appropriate folders so that my R package yorkr can slice and dice the data to provide the pavilion-view analytics.

The charts capture all the breathless, heart-pounding, and nail-biting action in great details in the many tables and plots. Every table and chart tell a story. You just have to ‘read between the lines!’

GooglyPlusPlus2021 will update itself automatically every day, so the data will be current and you can analyse all matches upto the previous day, along with the historical performances of the teams. So make sure you check it everyday.

Note:

  1. All charts are interactive. To know how to use the interactive charts see my post GooglyPlusPlus2021 is now fully interactive!!!
  2. The are 5 tabs for each of the formats supported by GooglyPlusPlus2021 which now supports IPL, Intl. T20(men), Intl. T20(women), BBL, NTB, PSL, CPL, SSM, WBB. Besides, it also supports ODI (men) and ODI (women)
  3. Each of the formats have 5 tabs – Batsman, Bowler, Match, Head-to-head and Overall Performace.
  4. All T20 formats also include a ranking functionality for the batsmen and bowlers
  5. You can now perform drill-down analytics for batsmen, bowlers, head-to-head and overall performance based on date-range selector functionality. The ranking tabs also include date range selector granular analysis. For more details see GooglyPlusPlus2021 enhanced with drill-down batsman, bowler analytics

Try out GooglyPlusPlus2021 here GooglyPlusPlus2021!!

You can clone fork the code from Github gpp2021-8

I am including some random screenshots of things that can be done with GooglyPlusPlus2021

A. Papua New Guinea vs Oman (2021-10-17)

a. Batting partnership

B. Match worm chart (New Papua Guinea v Oman)

This was a no contest as Oman cruised to victory

C. Scotland vs Bangladesh (2021-10-17)

a. Scorland upset Bangladesh

b. March worm chart (Scotland vs Bangladesh)

Fortunes see-sawed one way, then another, as can be seen in the match worm chart

C. Netherlands vs Ireland (2021-10-18)

a. Batman vs Bowler

D. Historical performance head-to-head

a. Sri Lanka vs West Indies (2019-2021) – Batting partnerships

b. India vs England (2018 – 2021) – Bowling scorecard

c) Australia vs South Africa – Team wicket opposition

E) Overall performance

a. Pakistan batting scorecard since 2019

a. Win loss of Australia since 2019

F) Batsman Performance

a. PR Stirling’s runs against opposition since 2019

b. KJ Brien’s cumulative average runs since 2019

G. Bowler performance

a. PWH De Silva’s wicket prediction since 2019

b. T Shamsi’s cumulative average wickets since 2019

H. Ranking Intl. T20 batsman since 2019

a. Runs over Strike rate

b. Strike rate over runs

I. Ranking bowlers since 2019

a. Wickets over Economy rate

b. Economy rate over wickets

As mentioned above GooglyPlusPlus2021 will be updated daily automatically, so you won’t miss any analytic action.

Do give GooglyPlusPlus2021 a spin!

Clone/fork the code for the Shiny app from Github gpp2021-8

You may also like

  1. Natural language processing: What would Shakespeare say?
  2. Literacy in India – A deepR dive
  3. Practical Machine Learning with R and Python – Part 5
  4. Big Data 7: yorkr waltzes with Apache NiFi
  5. Getting started with Tensorflow, Keras in Python and R
  6. Deep Learning from first principles in Python, R and Octave – Part 7
  7. Introducing QCSimulator: A 5-qubit quantum computing simulator in R
  8. Video presentation on Machine Learning, Data Science, NLP and Big Data – Part 1

To see all post click Index of posts

GooglyPlusPlus2021 adds new bells and whistles!!

This latest update of GooglyPlusPlus2021 includes new controls which allow for granular analysis of teams and matches. This version includes a new ‘Date Range’ widget which will allow you to choose a specific interval between which you would like to analyze data. The Date Range widget has been added to 2 tabs namely

a) Head-to-Head

b) Overall Performance

Important note:

This change is applicable to all T20 formats and ODI formats that GooglyPlusPlus2021 handles. This means you can do fine-grained analysis of the following formats

a. IPL b. Intl. T20 (men) c. Intl. T20 (women)

d. BBL e. NTB f. PSL

g. WBB h. CPL i. SSM

j. ODI (men) k. ODI (women)

Important note 1: Also note that all charts in GooglyPlusPlus2021 are interactive. You ca hover over the charts to get details of the data below. You can also selectively filter in bar charts using double-click and click. To know more about how to use GooglyPlusPlus2021 interactively, please see my post GooglyPlusPlus2021 is now fully interactive!!

You can clone/download the code for GooglyPlusPlus2021 from Github at GooglyPlusPlus2021

Try out GooglyPlusPlus2021 here GooglyPlusPlus2021

Here are some random examples from the latest version of GooglyPlusPlus2021

a) Team Batting Scorecard – MI vs CSK (all matches 2008-2013) – Tendulkar era

Tendulkar is the top scorer, followed by Rohit Sharma and Jayasuriya for Mumbai Indians

b) Team Batting Partnerships (MI -CSK) – Tendulkar’s partnerships

Partnerships for Tendulkar with his MI team mates

c) Team Bowler Wicket Kinds (Opposition countries vs India in all matches in T20)

d) Win vs Loss India vs Australia T20 Women (2010 – 2015)

Australia won all 3 matches against India

e) Win vs Loss India vs Australia T20 Women (2015 – 2020)

Between 2016-2020 the tally is 3-2 for Australia vs India

f) Wins vs Losses – MI vs all other teams 2013 – 2018

g) Team Batting Partnerships Head-to-head Australia vs England ODI (Women)

Partnerships of Australia women EA Perry and AJ Blackwell for Australia

Go ahead give GooglyPlusPlus2021 a try!

Hope you have fun!

Also see

  1. Exploring Quantum Gate operations with QCSimulator
  2. De-blurring revisited with Wiener filter using OpenCV
  3. Deep Learning from first principles in Python, R and Octave – Part 3
  4. Big Data-4: Webserver log analysis with RDDs, Pyspark, SparkR and SparklyR
  5. Cricpy adds team analytics to its arsenal!!
  6. Practical Machine Learning with R and Python – Part 5

To see all posts see Index of posts

GooglyPlusPlus2021 is now fully interactive!!!

GooglyPlusPlus2021 is now fully interactive. Please read the below post carefully to see the different ways you can interact with the data in the plots.

There are 2 main updates in this latest version of GooglyPlusPlus2021

a) GooglyPlusPlus gets all ‘touchy, feely‘ with the data and now you can interact with the plot/chart to get more details of the underlying data. There are many ways you can slice’n dice the data in the charts. The examples below illustrate a few of this. You can interact with plots by hover’ing, ‘click’ing and ‘double-click’ing curves, plots, barplots to get details of the data.

b) GooglyPlusPlus also includes the ‘Super Smash T20’ league from New Zealand. You can analyze batsmen, bowlers, matches, teams and rank Super Smash (SSM) also

Note: GooglyPlusPlus2021 can handle a total of 11 formats including T20 and ODI. They are

i) IPL ii) Intl. T20(men) ii) Intl. T20(women) iv) BBL

v) NTB vi) PSL vii) WBB. viii) CPL

ix) SSM x) ODI (men) xi) ODI (women)

Each of these formats have 7 tabs which are

— Analyze batsman

— Analyze bowlers

— Analyze match

— Head-to-head

— Team vs all other teams

— Rank batsmen

— Rank bowlers

Within these 11 x 7 = 77 tabs you can analyze batsmen, bowlers, matches, head-to-head, team vs all other teams and rank players for T20 and ODI. In addition all plots have been made interactive so there is a lot more information that you can get from these charts

Try out the interactive GooglyPlusPlus2021 now!!!

You can fork/clone the Shiny app from Github at GooglyPlusPlus2021

Below I have randomly included some charts for different formats to show how you can interact with them

a) Batsman Analysis – Runs vs Deliveries (IPL)

Mouse-over/Hover

The plot below gives the number of runs scored by David Warner vs Deliveries faced.

b) Batsman Analysis – Runs vs Deliveries (IPL) (prediction)

Since a 2nd order regression line,with confidence intervals(shaded area), has been fitted in the above plot, we can predict the runs given the ‘balls faced’ as below

Click ‘Toggle Spike lines’ (use palette on top-right)

By using hover(mouse-over) on the curve we can determine the predicted number of runs Warner will score given a certain number of deliveries

c) Bowler Analysis – Wickets against opposition – Intl. T20 (women)

Jhulan Goswami’s wickets against opposition countries in Intl. T20 (women)

d) Bowler Analysis (Predict bowler wickets) IPL – (non-interactive**)

Note: Some plots are non-interactive, like the one below which predicts the number of wickets Bumrah will take based on number of deliveries bowled

e) Match Analysis – Batsmen Partnership -Intl. T20 (men)

India vs England batting partnership between Virat Kohli & Shikhar Dhawan in all matches between England and India

f) Match Analysis – Worm chart (Super Smash T20) SSM

i) Worm chart of Auckland vs Northern Districts (29 Jan 2021).

ii) The final cross-over happens around the 2nd delivery of the 19th over (18.2) as Northern Districts over-takes Auckland to win the match.

g) Head-to-head – Team batsmen vs bowlers (Bangladesh batsmen against Afghanistan bowlers) Intl. T20 (men)

Batting performance of Shakib-al-Hasan (Bangladesh) against Afghanistan bowlers in Intl. T20 (men)

h) Head-to-head – Team batsmen vs bowlers (Bangladesh batsmen against Afghanistan bowlers) Intl. T20 (men)Filter

Double click on Shakib-al-Hasan on the legend to get the performance of Shakib-al-Hasan against Afghanistan bowlers

Avoiding the clutter

i) Head-to-head – Team bowler vs batsmen (Chennai Super Kings bowlers vs Mumbai Indians batsmen) – IPL

If you choose the above option the resulting plot is very crowded as shown below

To get the performance of Mumbai Indian (MI) batsmen (Rohit Sharma & Kieron Pollard) against Chennai Super Kings (CSK) bowlers in all matches do as told below

Steps to avoid clutter in stacked bar plots

1) This can be avoided by selectively choosing to filter out the batsmen we are interested in. say RG Sharma and Kieron Pollard. Then double-ciick RG Sharma, this is will bring up the chart with only RG Sharma as below

2) Now add additional batsmen you are interested in by single-clicking. In the example below Kieron Pollard is added

You can continue to add additional players that you are interested by single clicking.

j) Head-to-head (Performance of Indian batsmen vs Australian bowlers)- ODI

In the plot V Kohli, MS Dhoni and SC Ganguly have been selected for their performance against Australian bowlers (use toggle spike lines)

k) Overall Performance – PSL batting partnership against all teams (Fakhar Zaman)

The plot below shows Fakhar Zaman (Lahore Qalanders) partnerships with other teammates in all matches in PSL.

l) Win-loss against all teams (CPL)

Win-loss chart of Jamaica Talawallahs (CPL) in all matches against all opposition

m) Team batting partnerships against all teams for India (ODI Women)

Batting partnerships of Indian ODI women against all other teams

n) Ranking of batsmen (IPL 2021)

Finally here is the latest ranking of IPL batsmen for IPL 2021 (can be done for all other T20 formats)

o) Ranking of bowlers (IPL 2021)

Clone/download the Shiny app from Github at GooglyPlusPlus2021

So what are you waiting for? Go ahead and try out GooglyPlusPlus2021!

Knock yourself out!

Enjoy enjaami!!!

See also

  1. Deconstructing Convolutional Neural Networks with Tensorflow and Keras
  2. Deep Learning from first principles in Python, R and Octave – Part 6
  3. Cricketr learns new tricks : Performs fine-grained analysis of players
  4. Big Data 6: The T20 Dance of Apache NiFi and yorkpy
  5. Using Linear Programming (LP) for optimizing bowling change or batting lineup in T20 cricket
  6. Practical Machine Learning with R and Python – Part 6
  7. Introducing QCSimulator: A 5-qubit quantum computing simulator in R
  8. Simulating an oscillating revoluteJoint in Android
  9. Benford’s law meets IPL, Intl. T20 and ODI cricket
  10. De-blurring revisited with Wiener filter using OpenCV

To see all posts click Index of posts

GooglyPlusPlus2021 bubbles up top T20 players in all formats!

“Would you tell me, please, which way I ought to go from here?”
“That depends a good deal on where you want to get to.”
“I don’t much care where –”
“Then it doesn’t matter which way you go.”
                              Lewis Carroll, Alice in Wonderland

  • Also see
  1. Cricketr adds team analytics to its repertoire!!!
  2. Introducing cricket package yorkr: Part 2-Trapped leg before wicket
  3. Introducing cricpy:A python package to analyze performances of cricketers
  4. Big Data-5: kNiFi-ing through cricket data with yorkpy
  5. Using Linear Programming (LP) for optimizing bowling change or batting lineup in T20 cricket
  6. See all 72+ posts on cricket in R, Python and Octave
  7. Deep Learning from first principles in Python, R and Octave – Part 5
  8. Practical Machine Learning with R and Python – Part 3
  9. Understanding Neural Style Transfer with Tensorflow and Keras

To see all post click Index of posts

 

 

GooglyPlusPlus2021 interactively ranks T20 batsmen and bowlers!!!

Every time I think that I have my R packages or Shiny apps all wrapped up, I find another idea trots up and knocks at my door. Since I intend to keep GooglyPlusPlus current with the latest data, I decided to include the ranking functions in my Shiny app GooglyPlusPlus.

Fortunately, since GooglyPlusPlus is based on my R package ‘yorkr‘ (see Introducing cricket package yorkr: Beaten by sheer pace!), I could make the necessary changes to the ranking functions in the package, so that it could be incorporated into my latest Shiny app GooglyPlusPlus2021!! To know how to use GooglyPlusPlus see my post Introducing GooglyPlusPlus

Note: GooglyPlusPlus can analyze batsmen, bowlers, matches and teams.

Take GooglyPlusPlus2021 for a test drive!!!

You can clone/fork GooglyPlusPlus2021 from Github

Here are a few scenarios from GooglyPlusPlus2021

A) Ranking batsmen

Ranking IPL batsmen (minMatches = 80) – The following table shows the ranking of IPL players who have played 80 matches or more

B) Identifying batsmen of potential and promise

Ranking IPL batsmen (minMatches =70) –  If we reduce the minimum number of matches played to 70, then we see it pushes up KL Rahul above Kohli.

Ranking IPL batsmen (minMatches =60) – When the slider is moved to 60, we see that Rishabh Pant has a better mean average and mean strike rate and is also ranked above Kohli. We can identify promising players this way. However, it is also likely that some players may be just a bright flash in the pan

C) Ranking T20 bowlers (men)

D) Ranking NTB Batsmen

GooglyPlusPlus2021 can rank all T20 formats (IPL, BBL, Intl. T20 (men), Intl. T20 (women), NTB, PSL and WBB. Do give it a try!

Also remember that GooglyPlusPlus2021 includes close to 100+ functions which enable it to perform analysis of batsmen, bowlers, T20 matches, head-to-head confrontation of T20 teams and overall performance of T20 teams . To know more about GooglyPlusPlus2021 see Introducing GooglyPlusPlus

You can download the code for this app from Github at GooglyPlusPlus2021

Do give GooglyPlusPlus2021 a spin!!

I do have some other ideas also which I will be incorporating  into GooglyPlusPlus2021.

Watch this space!!

Also see
1. Deep Learning from first principles in Python, R and Octave – Part 7
2. A method to crowd source pothole marking on (Indian) roads
3. Big Data 7: yorkr waltzes with Apache NiFi
4. Understanding Neural Style Transfer with Tensorflow and Keras
5. Revisiting World Bank data analysis with WDI and gVisMotionChart
6. Natural language processing: What would Shakespeare say?
7. Introducing QCSimulator: A 5-qubit quantum computing simulator in R
8. Introducing cricpy:A python package to analyze performances of cricketers
9. Simulating an Edge Shape in Android

To see all posts click Index of posts