GooglyPlusPlus2021 enhanced with drill-down batsman, bowler analytics

This latest update to GooglyPlusPlus2021 includes the following changes

a) All the functions in the ‘Batsman’ and ‘Bowler ‘tabs now include a date range, which allows you specify a period of interest.

b) The ‘Rank Batsman’ and ‘Rank Bowler’ tabs also include a date range selector, against the earlier version which had a ‘Since year’ slider see GooglyPlusPlus2021 bubbles up top T20 players in all formats!. The earlier ‘Since year’ slider option could only rank for the latest year or for all years up to the current year. Now with the new ‘date range’ picker we can check the batsman and bowler ranks in any IPL season or (any T20 format) or for a range of years.

c) Note: The Head-to-head and Overall performance tabs already include a date range selector.

There are 10 batsman functions and 9 bowler function that have changed for the following T20 and ODI formats and Rank batsman and bowler includes the ‘date range’ and has changed for all T20 formats.

GooglyPlusPlus2021 supports all the following T20 formats

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

i) ODI (men) ii) ODI (women) – 2 ODI panels

i.e. the changes impact (10 + 9) x 11 + (1 + 1 ) x 9 = 227 tabs which have been changed

The addition of date range enables a fine-grained analysis of players as the players progress through the years.

Note: All charts are interactive. To see how to use interactive charts of GooglyPlusPlus2021 see

GooglyPlusPlus2021 is now fully interactive!!!

GooglyPlusPlus2021 is based on my R package yorkr. The data is take from Cricsheet

You can clone/fork this latest version of GooglyPlusPlus2021 from Github at gpp2021-7

Check out the Shiny app here GooglyPlusPlus2021!!!

I have included some random screen shots of some of using these tabs and options in GooglyPlusPlus2021.

A) KL Rahul’s Cumulative average in IPL 2021 vs IPL 2020

a) KL Rahul in IPL 2021

b) KL Rahul in IPL 2020

B) Performance of Babar Azam in Intl. T20 (men)

a) Babar Azam’s cumulative average from 2019

b) Babar Azam’s Runs against opposition since 2019

Note: Intl. T20 (women) data available upto Mar 2020 from Cricsheet

a) A J Healy performance between 2010 – 2015

b) A J Healy performance between 2015 – 2020

D) M S Dhoni’s performance with the bat pre-2020 and post 2020

There has been a significant decline in Dhoni’s performance in the last couple of years

I) Dhoni’s performance from Jan 2010 to Dec 2019

a) Moving average at 25+ (Dhoni before)

The moving average actually moves up…

b) Cumulative average at 25+ (Dhoni before)

c) Cumulative Strike rate 140+ (Dhoni before)

d) Dhoni’s moving average is ~10-12 (post 2020)

e) Dhoni’s cumulative average (post 2020)

f) Dhoni’s strike rate ~80 (post 2020)

E) Bumrah’s performance in IPL

a) Bumrah’s performance in IPL 2020

b) Bumrah’s performance in IPL 2021

F) Moving average wickets for A. Shrubsole in ODI (women)

G) Chris Jordan’s cumulative economy rate

We can see that Jordan has become more expensive over the years

G) Ranking players

In this latest version the ‘Since year slider’ has been replaced with a Date Range selector. With this we can identify the player ranks in any IPL, CPL, PSL or BBL season. We can also check the performance over the last couple of years. Note: The matches played and Runs over Strike rate or Strike rate over runs can be computed. Similarly for bowlers we have Wickets over Economy rate and Economy rate over wickets options.

a) Ranking IPL batsman in IPL season 2020

b) Ranking Intl. T20 (batsmen) from Jan 2019 to Jul 2021

c) Ranking Intl. T20 bowlers (women) from Jan 2019 – Jul 2021

d) Best IPL bowlers over the last 3 seasons (Wickets over Economy rate)

e) Best IPL bowlers over the last 3 seasons (Economy rate over wickets)

You can clone/download this latest version of GooglyPlusPlus2021 from Github at gpp2021-7

Take GooglyPlusPlus2021 for a spin!!

Hope you have fun checking out the different tabs with the different options!!

Also see

  1. Deconstructing Convolutional Neural Networks with Tensorflow and Keras
  2. Using Reinforcement Learning to solve Gridworld
  3. Introducing QCSimulator: A 5-qubit quantum computing simulator in R
  4. De-blurring revisited with Wiener filter using OpenCV
  5. Deep Learning from first principles in Python, R and Octave – Part 5
  6. Big Data-4: Webserver log analysis with RDDs, Pyspark, SparkR and SparklyR
  7. Practical Machine Learning with R and Python – Part 4
  8. Pitching yorkpy…on the middle and outside off-stump to IPL – Part 2
  9. What would Shakespeare say?
  10. Bull in a china shop – Behind the scenes in android

To see more posts click Index of posts

GooglyPlusPlus2021: Restarting IPL 2021 as-it-happens!!!

The IPL 2021 extravaganza has restarted again, now in Dubai, and it was time for me to crank up good ol’ GooglyPlusPlus2021. As in my earlier post, GooglyPlus2021 with IPL 2021 as it happens, during the initial set of IPL 2021 games,, a command script will execute automatically every day, download the latest data files, unzip, sort, process and put them in appropriate directories so that GooglyPlusPlus can work its magic on the data, with my R package yorkr. You can do analysis of IPL 2021 matches, batsmen, bowlers, historical performance analysis of head-to-head clashes and performances of teams.

Note: Since the earlier instalment of IPL 2021, there are 2 key changes that have taken place in GooglyPlusPlus.

Now,

a) All charts are interactive. You can hover over charts, click, double-click to get more details. To see more details on how to use the interactive charts, see my post GooglyPlusPlus2021 is now fully interactive!

b) You can now analyse historical performances, compute team batting and bowling scorecards for specified periods. To know details see GooglyPlusPlus2021 adds new bells and whistles!

You can try out my app GooglyPlusPlus2021 by clicking GooglyPlusPlus2021

The code for my R package yorkr is available at Github at yorkr

You can clone/fork GooglyPlusPlus2021 from github at gpp2021-6

IPL 2021 is already underway.

Some key analysis and highlights of the 2 recently concluded IPL matches

  • CSK vs MI
  • KKR vs RCB

a) CSK vs MI (19 Sep 2021) – Batting Partnerships (CSK)

b) CSK vs MI (19 Sep 2021) – Bowling scorecard (MI)

c) CSK vs MI (19 Sep 2021) – Match worm chart

Even though MI had a much better start and were cruising along to a victory, they lost the plot around the 18.1 th over as seen below (hover on the chart)

d

d) KKR vs RCB ( 20 Sep 2021) – Bowling wicket match

This chart gives the wickets taken by the bowler and the total runs conceded

e) KKR vs RCB ( 20 Sep 2021) – Match worm chart

This was a no contest. RCB batting was pathetic and KKR blasted their way to victory as seen in this worm chart

Note: You can also do historical analysis of teams with GooglyPlusPlus2021

For the match to occur today PBKS vs RR (21 Sep 2021) we can perform head-to-head historical analysis. Here Kings XI Punjab has been chosen instead of Punjab Kings as that was its name.

f) Head-to-head (PBKS vs RR) today’s match 21 Sep 2021

For the Rajasthan Royals Sanjy Samson and Jos Buttler have the best performance from 2018 -2021 as seen below

For Punjab Kings KL Rahul and Chris Gayle are the leading scorers for the period 2018-2021

g) Current ranking of batsmen IPL 2021

h) Current ranking of bowlers IPL 2021

Also you analyse individual batsman and bowlers

i) Batsman analysis

To see Rituraj Gaikwad performance checkout the batsman tab

j) Bowler analysis

Performance of Varun Chakaravarty

Remember to check out GooglyPlusPlus2021 for your daily analysis of matches, teams, batsmen and bowlers. Your ride will be waiting for you!!!

You can clone/fork GooglyPlusPlus2021 from github at gpp2021-6

GooglyPlusPlus2021 has been updated with all completed 31 matches

 

Mumbai Indians-Royal Challengers Bangalore-2021-04-09Chennai Super Kings-Delhi Capitals-2021-04-10
Kolkata Knight Riders-Sunrisers Hyderabad-2021-04-11Punjab Kings-Rajasthan Royals-2021-04-12
Mumbai Indians-Kolkata Knight Riders-2021-04-13Royal Challengers Bangalore-Sunrisers Hyderabad-2021-04-14
Delhi Capitals-Rajasthan Royals-2021-04-15Punjab Kings-Chennai Super Kings-2021-04-16
Mumbai Indians-Sunrisers Hyderabad-2021-04-17Royal Challengers Bangalore-Kolkata Knight Riders-2021-04-18
Punjab Kings-Delhi Capitals-2021-04-18Chennai Super Kings-Rajasthan Royals-2021-04-19
Mumbai Indians-Delhi Capitals-2021-04-20Punjab Kings-Sunrisers Hyderabad-2021-04-21
Chennai Super Kings-Kolkata Knight Riders-2021-04-21Rajasthan Royals-Royal Challengers Bangalore-2021-04-22
Mumbai Indians-Punjab Kings-2021-04-23Kolkata Knight Riders-Rajasthan Royals-2021-04-24
Chennai Super Kings-Royal Challengers Bangalore-2021-04-25Delhi Capitals-Sunrisers Hyderabad-2021-04-25
Punjab Kings-Kolkata Knight Riders-2021-04-26Royal Challengers Bangalore-Delhi Capitals-2021-04-27
Sunrisers Hyderabad-Chennai Super Kings-2021-04-28Rajasthan Royals-Mumbai Indians-2021-04-29
Kolkata Knight Riders-Delhi Capitals-2021-04-29Punjab Kings-Royal Challengers Bangalore-2021-04-30.RData
Chennai Super Kings-Mumbai Indians-2021-05-01Rajasthan Royals-Sunrisers Hyderabad-2021-05-02
Punjab Kings-Delhi Capitals-2021-05-02Chennai Super Kings-Mumbai Indians-2021-09-19
Royal Challengers Bangalore-Kolkata Knight Riders-2021-09-20Rajasthan Royals-Punjab Kings-2021-09-21
Sunrisers Hyderabad-Delhi Capitals-2021-09-22.RDataMumbai Indians-Kolkata Knight Riders-2021-09-23.RData
Royal Challengers Bangalore-Chennai Super Kings-2021-09-24.RDataPunjab Kings-Sunrisers Hyderabad-2021-09-25
Delhi Capitals-Rajasthan Royals-2021-09-25.RDataRoyal Challengers Bangalore-Mumbai Indians-2021-09-26.RData
Kolkata Knight Riders-Chennai Super Kings-2021-09-26.RDataKolkata Knight Riders-Chennai Super Kings-2021-09-26.RData
Delhi Capitals-Kolkata Knight Riders-2021-09-28.RDataRajasthan Royals-Royal Challengers Bangalore-2021-09-29.RData
Sunrisers Hyderabad-Chennai Super Kings-2021-09-30.RDataKolkata Knight Riders-Punjab Kings-2021-10-01.RData
Chennai Super Kings-Rajasthan Royals-2021-10-02.RDataMumbai Indians-Delhi Capitals-2021-10-02.RData
Royal Challengers Bangalore-Punjab Kings-2021-10-03.RDataChennai Super Kings-Delhi Capitals-2021-10-04.RData
Rajasthan Royals-Mumbai Indians-2021-10-05.RDataSunrisers Hyderabad-Royal Challengers Bangalore-2021-10-06.RData

Also see

  1. Deep Learning from first principles in Python, R and Octave – Part 5
  2. Introducing QCSimulator: A 5-qubit quantum computing simulator in R
  3. Computer Vision: Ramblings on derivatives, histograms and contours
  4. Designing a Social Web Portal
  5. Understanding Neural Style Transfer with Tensorflow and Keras
  6. Big Data 6: The T20 Dance of Apache NiFi and yorkpy
  7. Practical Machine Learning with R and Python – Part 6
  8. Introducing cricpy:A python package to analyze performances of cricketers
  9. A closer look at “Robot Horse on a Trot” in Android
  10. Cricketr adds team analytics to its repertoire!!!

To see all posts 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

GooglyPlusPlus 2020!!

I have updated my GooglyPlusPlus Shiny app with data from latest IPL 2020. GooglyPlusPlus  2020 is also based on my R package yorkr.  To know more about yorkr (see Revitalizing R package yorkr.) Now you should be able to analyze IPL matches, teams, players upto IPL 2020. Note: My latest GooglyPlusPlus 2020 can analyze all formats of T20 matches. yorkr uses data from Cricsheet

There are 5 tabs in each of the T20 formats

i) Analyze T20 batsmen ii) Analyze T20 bowlers. iii) Analyze T20 match iv) Analyze T20 team

vs another T20 team v) Analyze overall performance of T20 against all other teams

I plan to update GooglyPlusPlus  at least twice a year  to keep it abreast of all the latest data of all T20 formats

In GooglyPlusPlus 2020 you can check out IPL data upto 2020, besides other T20 formats like BBL, PSL, NTB, WBBL, Intl. T20 etc.

Try out GooglyPlusPlus 2020 Shiny app!!

You can clone/fork the code from Github GooglyPlusPlus2020

Important note: My earlier app GooglyPlusPlus handled all T20 formats including ODI (men and women). Due to an issue with Shiny, I could not include ODI matches in GooglyPlusPlus 2020

Here are some snapshots from GooglyPlusPlus 2020

A. Batting – Runs vs Deliveries (Shreyas Iyer)

 

 

B. Batting – Cumulative Batting Average (Shubman Gill)

 

C. Bowling – Mean Economy Rate (T. Natarajan)

 

D. Bowling -Bowler’s wickets against opposition (N A Saini)

E. Match scorecard – CSK vs DC 2020-10-17

The scorecards batting and bowling are computed on the fly for all T20 matches

 

F. Match – Batsmen vs Bowlers (DD vs KKR 2015-04-20)

 

G. Head-to-head: MI vs  KXIP all matches – Batting scorecard

H. Overall team performance- Team Bowler Wicket kind: Rajasthan Royals

Clone/fork the code from Github GooglyPlusPlus2020

Do take GooglyPlusPlus 2020 for a drive! While I have highlighted only IPL T20, because I have updated with the latest data, GooglyPlusPlus 2020 can also handle other T20 formats like BBL, Natwest, PSL, Intl. T20 (men &women) and WBB

 

Hope you have fun!

Also see

1.Big Data 7: yorkr waltzes with Apache NiFi

2. Deep Learning from first principles in Python, R and Octave – Part 6

3. Deconstructing Convolutional Neural Networks with Tensorflow and Keras

4. Sea shells on the seashore

5. Practical Machine Learning with R and Python – Part 3

6. Benford’s law meets IPL, Intl. T20 and ODI cricket

To see all posts click Index of posts

Rank IPL batsmen and bowlers post IPL 2020

Introduction

This post ranks IPL batsmen and bowlers post IPL 2020 season based on my R package yorkr. To know more about yorkr see Revisting R package yorkrAnalysis of IPL T20 matches with yorkr templates and others posts on this R package in Index of posts

library(yorkr)

1. Convert YAML files to match data

Convert all the match data as YAML file into .RData

#convertAllYaml2RDataframesT20("ipl","IPLMatches")

2. Rank the IPL Batsmen post IPL 2020

The function below ranks the IPL batsmen post IPL 2020. Note: We can specify the minimum number of matches that should have played by the batsmen for the ranking. By varying this parameter we can identify upcoming stars versus those who are more consistent.

dir="/Users/tvganesh/backup/software/cricket-package/yorkr-cricsheet/ipl2020/IPLMatches"
odir="/Users/tvganesh/backup/software/cricket-package/yorkr-cricsheet/ipl2020/IPLBattingBowlingDetails"


rankIPLBatsmen(dir=dir,odir=odir,minMatches=60)
## [1] "Chennai Super Kings"
## [1] "Delhi Capitals"
## [1] "Deccan Chargers"
## [1] "Delhi Daredevils"
## [1] "Kings XI Punjab"
## [1] "Kochi Tuskers Kerala"
## [1] "Kolkata Knight Riders"
## [1] "Mumbai Indians"
## [1] "Pune Warriors"
## [1] "Rajasthan Royals"
## [1] "Royal Challengers Bangalore"
## [1] "Sunrisers Hyderabad"
## [1] "Gujarat Lions"
## [1] "Rising Pune Supergiants"
## [1] "Chennai Super Kings-BattingDetails.RData"
## [1] "Delhi Capitals-BattingDetails.RData"
## [1] "Deccan Chargers-BattingDetails.RData"
## [1] "Delhi Daredevils-BattingDetails.RData"
## [1] "Kings XI Punjab-BattingDetails.RData"
## [1] "Kochi Tuskers Kerala-BattingDetails.RData"
## [1] "Kolkata Knight Riders-BattingDetails.RData"
## [1] "Mumbai Indians-BattingDetails.RData"
## [1] "Pune Warriors-BattingDetails.RData"
## [1] "Rajasthan Royals-BattingDetails.RData"
## [1] "Royal Challengers Bangalore-BattingDetails.RData"
## [1] "Sunrisers Hyderabad-BattingDetails.RData"
## [1] "Gujarat Lions-BattingDetails.RData"
## [1] "Rising Pune Supergiants-BattingDetails.RData"
## # A tibble: 65 x 4
##    batsman        matches meanRuns meanSR
##    <chr>            <int>    <dbl>  <dbl>
##  1 DA Warner          146     37.5   128.
##  2 CH Gayle           132     36.4   134.
##  3 SE Marsh            67     35.9   120.
##  4 KL Rahul            73     34.2   126.
##  5 RR Pant             68     31.8   133.
##  6 V Kohli            190     31.6   118.
##  7 AB de Villiers     155     30.5   136.
##  8 F du Plessis        79     30.4   118.
##  9 S Dhawan           174     30.0   115.
## 10 Q de Kock           64     29.8   119.
## # … with 55 more rows
rankIPLBatsmen(dir=dir,odir=odir,minMatches=70)
## [1] "Chennai Super Kings"
## [1] "Delhi Capitals"
## [1] "Deccan Chargers"
## [1] "Delhi Daredevils"
## [1] "Kings XI Punjab"
## [1] "Kochi Tuskers Kerala"
## [1] "Kolkata Knight Riders"
## [1] "Mumbai Indians"
## [1] "Pune Warriors"
## [1] "Rajasthan Royals"
## [1] "Royal Challengers Bangalore"
## [1] "Sunrisers Hyderabad"
## [1] "Gujarat Lions"
## [1] "Rising Pune Supergiants"
## [1] "Chennai Super Kings-BattingDetails.RData"
## [1] "Delhi Capitals-BattingDetails.RData"
## [1] "Deccan Chargers-BattingDetails.RData"
## [1] "Delhi Daredevils-BattingDetails.RData"
## [1] "Kings XI Punjab-BattingDetails.RData"
## [1] "Kochi Tuskers Kerala-BattingDetails.RData"
## [1] "Kolkata Knight Riders-BattingDetails.RData"
## [1] "Mumbai Indians-BattingDetails.RData"
## [1] "Pune Warriors-BattingDetails.RData"
## [1] "Rajasthan Royals-BattingDetails.RData"
## [1] "Royal Challengers Bangalore-BattingDetails.RData"
## [1] "Sunrisers Hyderabad-BattingDetails.RData"
## [1] "Gujarat Lions-BattingDetails.RData"
## [1] "Rising Pune Supergiants-BattingDetails.RData"
## # A tibble: 51 x 4
##    batsman        matches meanRuns meanSR
##    <chr>            <int>    <dbl>  <dbl>
##  1 DA Warner          146     37.5   128.
##  2 CH Gayle           132     36.4   134.
##  3 KL Rahul            73     34.2   126.
##  4 V Kohli            190     31.6   118.
##  5 AB de Villiers     155     30.5   136.
##  6 F du Plessis        79     30.4   118.
##  7 S Dhawan           174     30.0   115.
##  8 AM Rahane          124     29.6   105.
##  9 SS Iyer             77     29.3   111.
## 10 G Gambhir          155     29     110.
## # … with 41 more rows

3. Rank IPL bowlers post IPL 2020

The function ranks IPL bowlers post IPL 2020. We can specify the minimum number of matches that should have been played by the bowlers

dir="/Users/tvganesh/backup/software/cricket-package/yorkr-cricsheet/ipl2020/IPLMatches"
odir="/Users/tvganesh/backup/software/cricket-package/yorkr-cricsheet/ipl2020/IPLBattingBowlingDetails"
rankIPLBowlers(dir=dir,odir=odir,minMatches=60)
## [1] "Chennai Super Kings"
## [1] "Delhi Capitals"
## [1] "Deccan Chargers"
## [1] "Delhi Daredevils"
## [1] "Kings XI Punjab"
## [1] "Kochi Tuskers Kerala"
## [1] "Kolkata Knight Riders"
## [1] "Mumbai Indians"
## [1] "Pune Warriors"
## [1] "Rajasthan Royals"
## [1] "Royal Challengers Bangalore"
## [1] "Sunrisers Hyderabad"
## [1] "Gujarat Lions"
## [1] "Rising Pune Supergiants"
## [1] "Chennai Super Kings-BowlingDetails.RData"
## [1] "Delhi Capitals-BowlingDetails.RData"
## [1] "Deccan Chargers-BowlingDetails.RData"
## [1] "Delhi Daredevils-BowlingDetails.RData"
## [1] "Kings XI Punjab-BowlingDetails.RData"
## [1] "Kochi Tuskers Kerala-BowlingDetails.RData"
## [1] "Kolkata Knight Riders-BowlingDetails.RData"
## [1] "Mumbai Indians-BowlingDetails.RData"
## [1] "Pune Warriors-BowlingDetails.RData"
## [1] "Rajasthan Royals-BowlingDetails.RData"
## [1] "Royal Challengers Bangalore-BowlingDetails.RData"
## [1] "Sunrisers Hyderabad-BowlingDetails.RData"
## [1] "Gujarat Lions-BowlingDetails.RData"
## [1] "Rising Pune Supergiants-BowlingDetails.RData"
## # A tibble: 21 x 4
##    bowler          matches totalWickets meanER
##    <chr>             <int>        <dbl>  <dbl>
##  1 SL Malinga          120          184   6.99
##  2 SP Narine           117          143   6.82
##  3 Harbhajan Singh     131          134   7.11
##  4 DJ Bravo             91          125   8.20
##  5 YS Chahal            97          124   7.73
##  6 B Kumar              90          121   7.40
##  7 JJ Bumrah            91          119   7.35
##  8 R Ashwin             92           98   6.81
##  9 RA Jadeja           102           91   8.04
## 10 PP Chawla            85           87   8.02
## # … with 11 more rows
rankIPLBowlers(dir=dir,odir=odir,minMatches=50)
## [1] "Chennai Super Kings"
## [1] "Delhi Capitals"
## [1] "Deccan Chargers"
## [1] "Delhi Daredevils"
## [1] "Kings XI Punjab"
## [1] "Kochi Tuskers Kerala"
## [1] "Kolkata Knight Riders"
## [1] "Mumbai Indians"
## [1] "Pune Warriors"
## [1] "Rajasthan Royals"
## [1] "Royal Challengers Bangalore"
## [1] "Sunrisers Hyderabad"
## [1] "Gujarat Lions"
## [1] "Rising Pune Supergiants"
## [1] "Chennai Super Kings-BowlingDetails.RData"
## [1] "Delhi Capitals-BowlingDetails.RData"
## [1] "Deccan Chargers-BowlingDetails.RData"
## [1] "Delhi Daredevils-BowlingDetails.RData"
## [1] "Kings XI Punjab-BowlingDetails.RData"
## [1] "Kochi Tuskers Kerala-BowlingDetails.RData"
## [1] "Kolkata Knight Riders-BowlingDetails.RData"
## [1] "Mumbai Indians-BowlingDetails.RData"
## [1] "Pune Warriors-BowlingDetails.RData"
## [1] "Rajasthan Royals-BowlingDetails.RData"
## [1] "Royal Challengers Bangalore-BowlingDetails.RData"
## [1] "Sunrisers Hyderabad-BowlingDetails.RData"
## [1] "Gujarat Lions-BowlingDetails.RData"
## [1] "Rising Pune Supergiants-BowlingDetails.RData"
## # A tibble: 28 x 4
##    bowler          matches totalWickets meanER
##    <chr>             <int>        <dbl>  <dbl>
##  1 SL Malinga          120          184   6.99
##  2 SP Narine           117          143   6.82
##  3 Harbhajan Singh     131          134   7.11
##  4 DJ Bravo             91          125   8.20
##  5 YS Chahal            97          124   7.73
##  6 B Kumar              90          121   7.40
##  7 JJ Bumrah            91          119   7.35
##  8 R Ashwin             92           98   6.81
##  9 RA Jadeja           102           91   8.04
## 10 PP Chawla            85           87   8.02
## # … with 18 more rows
  1. Designing a Social Web Portal
  2. ntroducing QCSimulator: A 5-qubit quantum computing simulator in R
  3. Understanding Neural Style Transfer with Tensorflow and Keras
  4. Big Data-5: kNiFi-ing through cricket data with yorkpy
  5. Programming languages in layman’s language

To see all posts click Index of posts

Benford’s law meets IPL, Intl. T20 and ODI cricket

“To grasp how different a million is from a billion, think about it like this: A million seconds is a little under two weeks; a billion seconds is about thirty-two years.”

“One of the pleasures of looking at the world through mathematical eyes is that you can see certain patterns that would otherwise be hidden.”

               Steven Strogatz, Prof at Cornell University

Introduction

Within the last two weeks, I was introduced to Benford’s Law by 2 of my friends. Initially, I looked it up and Google and was quite intrigued by the law. Subsequently another friends asked me to check the ‘Digits’ episode, from the “Connected” series on Netflix by Latif Nasser, which I strongly recommend you watch.

Benford’s Law also called the Newcomb–Benford law, the law of anomalous numbers, or the First Digit Law states that, when dealing with quantities obtained from Nature, the frequency of appearance of each digit in the first significant place is logarithmic. For example, in sets that obey the law, the number 1 appears as the leading significant digit about 30.1% of the time, the number 2 about 17.6%, number 3 about 12.5% all the way to the number 9 at 4.6%. This interesting logarithmic pattern is observed in most natural datasets from population densities, river lengths, heights of skyscrapers, tax returns etc. What is really curious about this law, is that when we measure the lengths of rivers, the law holds perfectly regardless of the units used to measure. So the length of the rivers would obey the law whether we measure in meters, feet, miles etc. There is something almost mystical about this law.

The law has also been used widely to detect financial fraud, manipulations in tax statements, bots in twitter, fake accounts in social networks, image manipulation etc. In this age of deep fakes, the ability to detect fake images will assume paramount importance. While deviations from Benford Law do not always signify fraud, to large extent they point to an aberration. Prof Nigrini, of Cape Town used this law to identify financial discrepancies in Enron’s financial statement resulting in the infamous scandal. Also the 2009 Iranian election was found to be fradulent as the first digit percentages did not conform to those specified by Benford’s Law.

While it cannot be said with absolute certainty, marked deviations from Benford’s law could possibly indicate that there has been manipulation of natural processes. Possibly Benford’s law could be used to detect large scale match-fixing in cricket tournaments. However, we cannot look at this in isolation and the other statistical and forensic methods may be required to determine if there is fraud. Here is an interesting paper Promises and perils of Benford’s law

A set of numbers is said to satisfy Benford’s law if the leading digit d (d ∈ {1, …, 9}) occurs with probability

P(d)=log_{10}(1+1/d)

This law also works for number in other bases, in base b >=2

P(d)=log_{b}(1+1/d)

Interestingly, this law also applies to sports on the number of point scored in basketball etc. I was curious to see if this applied to cricket. Previously, using my R package yorkr, I had already converted all T20 data and ODI data from Cricsheet which is available at yorkrData2020, I wanted to check if Benford’s Law worked on the runs scored, or deliveries faced by batsmen at team level or at a tournament level (IPL, Intl. T20 or ODI).

Thankfully, R has a package benford.analysis to check for data behaviour in accordance to Benford’s Law, and I have used this package in my post

This post is also available in RPubs as Benford’s Law meets IPL, Intl. T20 and ODI

library(data.table)
library(reshape2)
library(dplyr)
library(benford.analysis)
library(yorkr)

In this post, I have randomly check data with Benford’s law. The fully converted dataset is available in yorkrData2020 which I have included above. You can try on any dataset including ODI (men,women),Intl T20(men,women),IPL,BBL,PSL,NTB and WBB.

1. Check the runs distribution by Royal Challengers Bangalore

We can see the behaviour is as expected with Benford’s law, with minor deviations

load("/Users/tvganesh/backup/software/cricket-package/yorkr-cricsheet/yorkrData2020/ipl/iplBattingBowlingDetails/Royal Challengers Bangalore-BattingDetails.RData")
rcbRunsTrends = benford(battingDetails$runs, number.of.digits = 1, discrete = T, sign = "positive") 
rcbRunsTrends
## 
## Benford object:
##  
## Data: battingDetails$runs 
## Number of observations used = 1205 
## Number of obs. for second order = 99 
## First digits analysed = 1
## 
## Mantissa: 
## 
##    Statistic  Value
##         Mean  0.458
##          Var  0.091
##  Ex.Kurtosis -1.213
##     Skewness -0.025
## 
## 
## The 5 largest deviations: 
## 
##   digits absolute.diff
## 1      1         14.26
## 2      7         13.88
## 3      9          8.14
## 4      6          5.33
## 5      4          4.78
## 
## Stats:
## 
##  Pearson's Chi-squared test
## 
## data:  battingDetails$runs
## X-squared = 5.2091, df = 8, p-value = 0.735
## 
## 
##  Mantissa Arc Test
## 
## data:  battingDetails$runs
## L2 = 0.0022852, df = 2, p-value = 0.06369
## 
## Mean Absolute Deviation (MAD): 0.004941381
## MAD Conformity - Nigrini (2012): Close conformity
## Distortion Factor: -18.8725
## 
## Remember: Real data will never conform perfectly to Benford's Law. You should not focus on p-values!

2. Check the ‘balls played’ distribution by Royal Challengers Bangalore

load("/Users/tvganesh/backup/software/cricket-package/yorkr-cricsheet/yorkrData2020/ipl/iplBattingBowlingDetails/Royal Challengers Bangalore-BattingDetails.RData")
rcbBallsPlayedTrends = benford(battingDetails$ballsPlayed, number.of.digits = 1, discrete = T, sign = "positive") 
plot(rcbBallsPlayedTrends)

 

3. Check the runs distribution by Chennai Super Kings

The trend seems to deviate from the expected behavior to some extent in the number of digits for 5 & 7.

load("/Users/tvganesh/backup/software/cricket-package/yorkr-cricsheet/yorkrData2020/ipl/iplBattingBowlingDetails/Chennai Super Kings-BattingDetails.RData")
cskRunsTrends = benford(battingDetails$runs, number.of.digits = 1, discrete = T, sign = "positive") 
cskRunsTrends
## 
## Benford object:
##  
## Data: battingDetails$runs 
## Number of observations used = 1054 
## Number of obs. for second order = 94 
## First digits analysed = 1
## 
## Mantissa: 
## 
##    Statistic  Value
##         Mean  0.466
##          Var  0.081
##  Ex.Kurtosis -1.100
##     Skewness -0.054
## 
## 
## The 5 largest deviations: 
## 
##   digits absolute.diff
## 1      5         27.54
## 2      2         18.40
## 3      1         17.29
## 4      9         14.23
## 5      7         14.12
## 
## Stats:
## 
##  Pearson's Chi-squared test
## 
## data:  battingDetails$runs
## X-squared = 22.862, df = 8, p-value = 0.003545
## 
## 
##  Mantissa Arc Test
## 
## data:  battingDetails$runs
## L2 = 0.002376, df = 2, p-value = 0.08173
## 
## Mean Absolute Deviation (MAD): 0.01309597
## MAD Conformity - Nigrini (2012): Marginally acceptable conformity
## Distortion Factor: -17.90664
## 
## Remember: Real data will never conform perfectly to Benford's Law. You should not focus on p-values!

4. Check runs distribution in all of Indian Premier League (IPL)

battingDF <- NULL
teams <-c("Chennai Super Kings","Deccan Chargers","Delhi Daredevils",
          "Kings XI Punjab", 'Kochi Tuskers Kerala',"Kolkata Knight Riders",
          "Mumbai Indians", "Pune Warriors","Rajasthan Royals",
          "Royal Challengers Bangalore","Sunrisers Hyderabad","Gujarat Lions",
          "Rising Pune Supergiants")


setwd("/Users/tvganesh/backup/software/cricket-package/yorkr-cricsheet/yorkrData2020/ipl/iplBattingBowlingDetails")
for(team in teams){
  battingDetails <- NULL
  val <- paste(team,"-BattingDetails.RData",sep="")
  print(val)
  tryCatch(load(val),
           error = function(e) {
             print("No data1")
             setNext=TRUE
           }
           
           
  )
  details <- battingDetails
  battingDF <- rbind(battingDF,details)
}
## [1] "Chennai Super Kings-BattingDetails.RData"
## [1] "Deccan Chargers-BattingDetails.RData"
## [1] "Delhi Daredevils-BattingDetails.RData"
## [1] "Kings XI Punjab-BattingDetails.RData"
## [1] "Kochi Tuskers Kerala-BattingDetails.RData"
## [1] "Kolkata Knight Riders-BattingDetails.RData"
## [1] "Mumbai Indians-BattingDetails.RData"
## [1] "Pune Warriors-BattingDetails.RData"
## [1] "Rajasthan Royals-BattingDetails.RData"
## [1] "Royal Challengers Bangalore-BattingDetails.RData"
## [1] "Sunrisers Hyderabad-BattingDetails.RData"
## [1] "Gujarat Lions-BattingDetails.RData"
## [1] "Rising Pune Supergiants-BattingDetails.RData"
trends = benford(battingDF$runs, number.of.digits = 1, discrete = T, sign = "positive") 
trends
## 
## Benford object:
##  
## Data: battingDF$runs 
## Number of observations used = 10129 
## Number of obs. for second order = 123 
## First digits analysed = 1
## 
## Mantissa: 
## 
##    Statistic   Value
##         Mean  0.4521
##          Var  0.0856
##  Ex.Kurtosis -1.1570
##     Skewness -0.0033
## 
## 
## The 5 largest deviations: 
## 
##   digits absolute.diff
## 1      2        159.37
## 2      9        121.48
## 3      7         93.40
## 4      8         83.12
## 5      1         61.87
## 
## Stats:
## 
##  Pearson's Chi-squared test
## 
## data:  battingDF$runs
## X-squared = 78.166, df = 8, p-value = 1.143e-13
## 
## 
##  Mantissa Arc Test
## 
## data:  battingDF$runs
## L2 = 5.8237e-05, df = 2, p-value = 0.5544
## 
## Mean Absolute Deviation (MAD): 0.006627966
## MAD Conformity - Nigrini (2012): Acceptable conformity
## Distortion Factor: -20.90333
## 
## Remember: Real data will never conform perfectly to Benford's Law. You should not focus on p-values!

5. Check Benford’s law in India matches

setwd("/Users/tvganesh/backup/software/cricket-package/yorkr-cricsheet/yorkrData2020/t20/t20BattingBowlingDetails")
load("India-BattingDetails.RData")

indiaTrends = benford(battingDetails$runs, number.of.digits = 1, discrete = T, sign = "positive") 
plot(indiaTrends)

 

6. Check Benford’s law in all of Intl. T20

setwd("/Users/tvganesh/backup/software/cricket-package/yorkr-cricsheet/yorkrData2020/t20/t20BattingBowlingDetails")
teams <-c("Australia","India","Pakistan","West Indies", 'Sri Lanka',
          "England", "Bangladesh","Netherlands","Scotland", "Afghanistan",
          "Zimbabwe","Ireland","New Zealand","South Africa","Canada",
          "Bermuda","Kenya","Hong Kong","Nepal","Oman","Papua New Guinea",
          "United Arab Emirates","Namibia","Cayman Islands","Singapore",
          "United States of America","Bhutan","Maldives","Botswana","Nigeria",
          "Denmark","Germany","Jersey","Norway","Qatar","Malaysia","Vanuatu",
          "Thailand")

for(team in teams){
  battingDetails <- NULL
  val <- paste(team,"-BattingDetails.RData",sep="")
  print(val)
  tryCatch(load(val),
           error = function(e) {
             print("No data1")
             setNext=TRUE
           }
           
           
  )
  details <- battingDetails
  battingDF <- rbind(battingDF,details)
  
}
intlT20Trends = benford(battingDF$runs, number.of.digits = 1, discrete = T, sign = "positive") 
intlT20Trends
## 
## Benford object:
##  
## Data: battingDF$runs 
## Number of observations used = 21833 
## Number of obs. for second order = 131 
## First digits analysed = 1
## 
## Mantissa: 
## 
##    Statistic  Value
##         Mean  0.447
##          Var  0.085
##  Ex.Kurtosis -1.158
##     Skewness  0.018
## 
## 
## The 5 largest deviations: 
## 
##   digits absolute.diff
## 1      2        361.40
## 2      9        276.02
## 3      1        264.61
## 4      7        210.14
## 5      8        198.81
## 
## Stats:
## 
##  Pearson's Chi-squared test
## 
## data:  battingDF$runs
## X-squared = 202.29, df = 8, p-value < 2.2e-16
## 
## 
##  Mantissa Arc Test
## 
## data:  battingDF$runs
## L2 = 5.3983e-06, df = 2, p-value = 0.8888
## 
## Mean Absolute Deviation (MAD): 0.007821098
## MAD Conformity - Nigrini (2012): Acceptable conformity
## Distortion Factor: -24.11086
## 
## Remember: Real data will never conform perfectly to Benford's Law. You should not focus on p-values!

Conclusion

Maths rules our lives, more than we are aware, more that we like to admit. It is there in all of nature. Whether it is the recursive patterns of Mandelbrot sets, the intrinsic notion of beauty through the golden ratio, the murmuration of swallows, the synchronous blinking of fireflies or in the almost univerality of Benford’s law on natural datasets, mathematics govern us.

Isn’t it strange that while we humans pride ourselves of freewill, the runs scored by batsmen in particular formats conform to Benford’s rule for the first digits. It almost looks like, the runs that will be scored is almost to extent predetermined to fall within specified ranges obeying Benford’s law. So much for choice.

Something to be pondered over!

Also see

  1. Introducing GooglyPlusPlus!!!
  2. Deconstructing Convolutional Neural Networks with Tensorflow and Keras
  3. Going deeper into IBM’s Quantum Experience!
  4. Experiments with deblurring using OpenCV
  5. Big Data 6: The T20 Dance of Apache NiFi and yorkpy
  6. Deep Learning from first principles in Python, R and Octave – Part 4
  7. Practical Machine Learning with R and Python – Part 4
  8. Re-introducing cricketr! : An R package to analyze performances of cricketers
  9. Bull in a china shop – Behind the scenes in Android

Introducing GooglyPlusPlus!!!

“We can lift ourselves out of ignorance, we can find ourselves as creatures of excellence and intelligence and skill.”
“Heaven is not a place, and it is not a time. Heaven is being perfect.”
“Your whole body, from wingtip to wingtip, is nothing more than your thought itself, in a form you can see. Break the chains of your thought, and you break the chains of your body, too.”

From Jonathan Livingstone Seagull, by Richard Bach

Introduction

The metamorphosis is complete, from eggs to the butterfly! My R package yorkr, went on to become Googly,  and then to GooglyPlus and  now finally GooglyPlusPlus. My latest R Shiny app now provides interactive visualisation of almost all data in Cricsheet. GooglyPlusPlus visualizes the following matches

1. ODI (men)
2. ODI (women)
3. Intl. T20 (men)
4. Intl T20 (women)
5. IPL (Indian Premier League)
6. BBL (Big Bash League)
7. NTB (Natwest T20)
8. PSL (Pakistan Super League)
9. WBBL – Women’s BBL

GooglyPlusPlus is entirely based on my R package yorkr. To know more about yorkr see ‘Revitalizing R package yorkr‘ and the roughly 25+ posts on yorkr in Index of posts

This Shiny app was quite involved, and it took a lot of work to keep things organised and separate for the different forms of cricket. Anyway it is done and I am happy with the outcome.

Before you use the app, I would suggest that you take a look at the video “How to use GooglyPlusPlus?“. In this video, I show the different features of GooglyPlusPlus and how to navigate through them.

Check out GooglyPlusPlus Shiny at GooglyPlusPlus

You can clone/fork and play around with the code of GooglyPlusPlus here at Github

A. Highlights of GooglyPlusPlus.

The R Shiny app GooglyPlusPlus has the following main pages for the 9 different cricket formats. See below

 

Important note: Below I will be including some random output from the GooglyPlusPlus app for different match formats, however there is a lot more features in GooglyPlusPlus

1.  Indian Premier League (IPL)

a. IPL batsman – Batsman Runs vs Deliveries

 

b. IPL Match – Match  batting scorecard

 

c. Head-to-head between 2 IPL Teams – Team Batsmen Batting Partnership All Matches

 

 

 

d. Overall Performance – Team Bowling Scorecard Overall

 

 

 

2. International T20 Men

a. Batsman Function- Runs vs Strike rate

 

 

 

b. Bowler Function – Mean Economy Rate

 

 

3. International T20 (Women)

a.Batsman Functions – Batsman Cumulative Average Runs

 

 

b. Intl T20 Women’s match – Match worm Graph

 

 

 

 

 

4. Big Bash League (BBL)

a.Head-to-Head: Team batsmen batting partnerships

 

b.  Overall Performance – Team batsmen vs bowlers

 

 

5. Natwest T20 (NTB)

a. Head-to-head : Team bowlers vs batsmen

 

 

 

b. Batsman Runs vs Deliveries

 

 

6. Pakistan Super League (PSL)

a. Overall Performance – Batsmen Partnership

 

b. Bowling Scorecard

 

7. Women’s Big Bash League (WBBL)

a. Bowler wicket against opposition

 

 

8. One Day International (ODI) Men

a. Batsman Runs Against Opposition

 

b. Team Batsmen against bowlers

 

 

9. One Day International (ODI) women)

a. Match Batting Scorecard

b. Batsman Cumulative Strike Rate

 

 

 

Conclusion

There you have it. I have randomly shown  2 functions for each cricket format. There are many functions in each tab for the for the different match formats – namely IPL, BBL, Intl T20 (men,women), PSL etc.  Go ahead and give GooglyPlusPlus a spin!

To try out GooglyPlusPlus click GooglyPlusPlus. Don’t forget to check out the video How to use GooglyPlusPlus?

You can clone/fork the code from Github at GooglyPlusPlus

Hope you have fun with GooglyPlusPlus!!

You may also like

1. Big Data 6: The T20 Dance of Apache NiFi and yorkpy
2. Deep Learning from first principles in Python, R and Octave – Part 7
3. De-blurring revisited with Wiener filter using OpenCV
4. Exploring Quantum Gate operations with QCSimulator
5. Latency, throughput implications for the Cloud
6. Programming Zen and now – Some essential tips-2
7. The Anomaly
8. Practical Machine Learning with R and Python – Part 3
9. Introducing cricpy:A python package to analyze performances of cricketers
10. The making of Total Control Android game

To see all posts click Index of posts