IPL 2022: Near real-time analytics with GooglyPlusPlus!!!

It is that time of the year when there is “a song in the air, the lark’s on the wing, and the snail’s on the the thorn“. Yes, it is the that time of year when the grand gala event of IPL 2022 is underway. So, I managed to wake myself from my Covid-induced slumber, worked up my ‘creaking bones‘ and cranked up the GooglyPlusPlus machinery.

So now, every morning, a scheduled CRON tab entry will automatically download the previous night’s match data from Cricsheet, unzip, process and transform it into the necessary format required by my R package yorkr, and make it available to my Shiny app GooglyPlusPlus. Hence the data is current and you have access to ‘analytics-in-the-now’!.

As you know in 2021, I added a lot of new features to GooglyPlusPlus, new tabs to do even more. analytics – or in other words there is “more GooglyPlusPlus per click!!”. So now, you have the following

  • 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
  • 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.

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

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

Go ahead, give GooglyPlusPlus a try!!!

To know all the new features and how to use them, check out these posts

  1. Ranking of batsmen, bowlers – GooglyPlusPlus2021 interactively ranks T20 batsmen and bowlers!!!
  2. Interactive charts – GooglyPlusPlus2021 is now fully interactive!!!
  3. Detailed batsmen/bowler analytics – GooglyPlusPlus2021 enhanced with drill-down batsman, bowler analytics
  4. Addition of Date Range picker to charts – GooglyPlusPlus2021 adds new bells and whistles!!
  5. Analysis of power play, middle and death overs across players, teams – GooglyPlusPlus2021 now with power play, middle and death over analysis
  6. Analysis based on 4 x 4 grid of players – GooglyPlusPlus2021: Towards more picturesque analytics!
  7. Optimisation of batsmen/bowlers – GooglyPlusPlus2022 optimizes batting/bowling lineup

Here are some random analysis that can be done by GooglyPlusPlus across the tabs. Note the app will be updated daily and the analytics will be current throughout the season of IPL 2022

A) Match tab

a) GT vs DC – 2 Apr 2022

Runs vs SR – Gujarat Titans

b) CSK vs LSG – 31 Mar 2022

Runs across 20 overs

c) KKR vs PBKS -Match wicket worm chart – 1 Apr 2022

B) Batsmen tab

a) Faf Du Plessis – Runs vs Deliveries

b) Sanju Samson – Runs against opposition

C) Bowler’s tab

a) D J Bravo – No of deliveries to wicket

b) Trent Boult – Wickets at Venues

D) Head-to-head tab

a) DC vs MI – Mar -2019 till date : Batting scorecard

b) CSK vs KKR – Jan 2019 till date : Runs vs SR

E) Team vs All Teams tab

a) Punjab Kings vs all Teams – Wickets vs ER in Power play

b) Rajasthan Royals vs all Teams : Jan 2019 till date : Runs vs SR in Power play

F) Optimisation tab

a) Batsmen vs Bowlers

b) Bowlers vs batsmen

G) Batting analysis

This tab is for ranking batsmen

a) Batsmen rank from 2019 till date (Runs over SR)

b) Overall Runs vs SR (Jan 2020 till date)

Best batsmen in top right quadrant

zooming in on the above (right-most)

H) Bowling analysis tab

a) Best middle over bowlers in IPL (2019 onwards)

The bottom right quadrant are the best bowlers

b) Best bowlers in death overs (bottom-right)

Check out GooglyPlusPlus!!!

Also see

  1. Deconstructing Convolutional Neural Networks with Tensorflow and Keras
  2. Deep Learning from first principles in Python, R and Octave – Part 5
  3. Big Data-4: Webserver log analysis with RDDs, Pyspark, SparkR and SparklyR
  4. Latency, throughput implications for the Cloud
  5. Introducing QCSimulator: A 5-qubit quantum computing simulator in R
  6. Practical Machine Learning with R and Python – Part 3
  7. Natural language processing: What would Shakespeare say?
  8. Introducing cricpy:A python package to analyze performances of cricketers

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 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 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 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

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

It’s a wrap! yorkr wraps up BBL, NTB, PSL and WBB!!!

“Do not take life too seriously. You will never get out of it alive.” – Elbert Hubbard

“How many people here have telekenetic powers? Raise my hand.” – Emo Philips

Have you ever noticed that anybody driving slower than you is an idiot, and anyone going faster than you is a maniac?” – George Carlin

 

It’s a wrap!!! In my previous posts,Revitalizing yorkr, I showed how you can use yorkr functions for Intl. ODI, Intl. T20 and IPL. My next post yorkr rocks women’s ODI and women’s Intl T20 yorkr handled women’s ODI and Intl. T20. In this post, yorkr wraps the remaining T20 formats namely

  1. Big Bash League (BBL)
  2. Natwest Super T20 (NTB)
  3. Pakistan Super League (PSL)
  4. Women’s Big Bash League (WBB)

The data for all the above T20 formats are taken from Cricsheet.

-All the data has been converted and is available in Github at yorkrData2020 organized as below. You can use any of the 90+ yorkr functions on the converted data.

Screenshot 2020-05-16 at 12.32.07 PM

-This post has been published at RPubs at yorkrWrapUpT20formats

-You can download a PDF version of this file at yorkrWrapsUpT20Formats

  • For ODI Matches men’s and women’ use
  1. ODI-Part1, 2. ODI-Part2,3. ODI-Part3, 4.ODI-Part 4
  • For any of the T20s formats you can use the following posts
  1. T20-Part1, 2. T20-Part2, 3. T20-Part3, 4. T20-Part4

or you can use these templates Intl. T20, or similar to IPL T20

I am going to randomly pick 2 yorkr functions for each of the T20 formats BBL, NTB, PSL and WBB to demonstrate yorkr below, however you can use any of the 90+ yorkr functions

install.packages("../../../yorkrgit/yorkr_0.0.9.tar.gz",repos = NULL, type="source")
library(yorkr)
library(dplyr)

Note: In the following T20 formats I have randomly picked 2 of the 90+ yorkr functions

A. Big Bash League (BBL)

A1.Batting Scorecard

load("../../../yorkrData2020/bbl/bblMatches/Adelaide Strikers-Brisbane Heat-2017-12-31.RData")
as_bh <- overs
teamBattingScorecardMatch(as_bh,'Adelaide Strikers')
## Total= 139
## # A tibble: 9 x 5
##   batsman      ballsPlayed fours sixes  runs
##   <chr>              <int> <dbl> <dbl> <dbl>
## 1 AT Carey               6     0     0     2
## 2 CA Ingram             21     2     0    23
## 3 J Weatherald          14     2     1    20
## 4 JS Lehmann            17     3     0    22
## 5 JW Wells              13     1     0    12
## 6 MG Neser              25     3     2    40
## 7 PM Siddle              1     0     0     1
## 8 Rashid Khan            2     0     1     6
## 9 TM Head               17     0     0    13

A2.Batting Partnership

load("../../../yorkrData2020/bbl/bblMatches2Teams/Melbourne Renegades-Sydney Sixers-allMatches.RData")
mr_ss_matches <- matches
m <-teamBatsmenPartnershiOppnAllMatches(mr_ss_matches,'Sydney Sixers',report="summary")
m
## # A tibble: 28 x 2
##    batsman      totalRuns
##    <chr>            <dbl>
##  1 MC Henriques       277
##  2 JR Philippe        186
##  3 NJ Maddinson       183
##  4 MJ Lumb            165
##  5 DP Hughes          158
##  6 JC Silk            141
##  7 SPD Smith          116
##  8 JM Vince            97
##  9 TK Curran           68
## 10 J Botha             33
## # … with 18 more rows

B. Natwest Super League

B1.Team Match Partnership

load("../../../yorkrData2020/ntb/ntbMatches/Derbyshire-Nottinghamshire-2019-07-26.RData")
db_nt <-overs
teamBatsmenPartnershipMatch(db_nt,"Derbyshire","Nottinghamshire")

B2.Batsmen vs Bowlers

load("../../../yorkrData2020/ntb/ntbMatches2Teams/Birmingham Bears-Leicestershire-allMatches.RData")
bb_le_matches <- matches
teamBatsmenVsBowlersOppnAllMatches(bb_le_matches,"Birmingham Bears","Leicestershire",top=3)

C. Pakistan Super League (PSL)

C1.Individual performance of Babar Azam

library(grid)
library(gridExtra)

babar <- getBatsmanDetails(team="Karachi Kings",name="Babar Azam",dir="../../../yorkrData2020/psl/pslBattingBowlingDetails/")
## [1] "../../../yorkrData2020/psl/pslBattingBowlingDetails//Karachi Kings-BattingDetails.RData"
print(dim(babar))
## [1] 40 15
p1 <-batsmanRunsVsStrikeRate(babar,"Babar Azam")
p2 <-batsmanMovingAverage(babar,"Babar Azam")
p3 <- batsmanCumulativeAverageRuns(babar,"Babar Azam")
grid.arrange(p1,p2,p3, ncol=2)

C2.Bowling performance against all oppositions

load("../../../yorkrData2020/psl/pslMatches2Teams/Lahore Qalandars-Multan Sultans-allMatches.RData")
lq_ms_matches <- matches
teamBowlingPerfOppnAllMatches(lq_ms_matches,"Lahore Qalanders","Multan Sultans")
## # A tibble: 40 x 5
##    bowler              overs maidens  runs wickets
##    <chr>               <int>   <int> <dbl>   <dbl>
##  1 Shaheen Shah Afridi    11       1   134      11
##  2 Junaid Khan             5       0   154       8
##  3 Imran Tahir             5       0    74       6
##  4 Mohammad Ilyas          5       0    93       4
##  5 Haris Rauf              7       0   154       3
##  6 D Wiese                 7       0    92       3
##  7 Mohammad Irfan          5       0    91       3
##  8 S Lamichhane            5       0    74       3
##  9 SP Narine               8       0    48       3
## 10 MM Ali                  3       0    30       3
## # … with 30 more rows

D. Women Big Bash League

D1.Bowling scorecard

load("../../../yorkrData2020/wbb/wbbMatches/Hobart Hurricanes-Brisbane Heat-2018-12-30.RData")
hh_bh_match <- overs
teamBowlingScorecardMatch(hh_bh_match,'Brisbane Heat')
## # A tibble: 6 x 5
##   bowler      overs maidens  runs wickets
##   <chr>       <int>   <int> <dbl>   <dbl>
## 1 DM Kimmince     3       0    31       2
## 2 GM Harris       4       0    23       3
## 3 H Birkett       1       0     7       0
## 4 JL Barsby       3       0    21       0
## 5 JL Jonassen     4       0    33       0
## 6 SJ Johnson      4       0    17       0

D2.Team batsmen partnerships

load("../../../yorkrData2020/wbb/wbbAllMatchesAllTeams/allMatchesAllOpposition-Perth Scorchers.RData")
ps_matches <- matches
teamBatsmenPartnershipAllOppnAllMatchesPlot(ps_matches,"Perth Scorchers",main="Perth Scorchers")

As mentioned above, I have randomly picked 2 yorkr functions for each of the T20 formats. You can use any of the 90+ functions for analysis of matches, teams, batsmen and bowlers.

1a. Ranking Big Bash League (BBL) batsman

dir="/Users/tvganesh/backup/software/cricket-package/yorkr-cricsheet/yorkrData2020/bbl/bblMatches"
odir="/Users/tvganesh/backup/software/cricket-package/yorkr-cricsheet/yorkrData2020/bbl/bblBattingBowlingDetails"
rankBBLBatsmen(dir=dir,odir=odir,minMatches=30)
## # A tibble: 62 x 4
##    batsman      matches meanRuns meanSR
##    <chr>          <int>    <dbl>  <dbl>
##  1 DJM Short         44     41.6   126.
##  2 SE Marsh          48     39.1   120.
##  3 AJ Finch          60     36.0   130.
##  4 AT Carey          36     35.9   129.
##  5 KP Pietersen      31     33.5   118.
##  6 UT Khawaja        40     31.5   112.
##  7 BJ Hodge          38     31.5   127.
##  8 CA Lynn           72     31.3   128.
##  9 MP Stoinis        53     30.7   112.
## 10 TM Head           45     30     131.
## # … with 52 more rows

1b. Ranking Big Bash League (BBL) bowlers

dir="/Users/tvganesh/backup/software/cricket-package/yorkr-cricsheet/yorkrData2020/bbl/bblMatches"
odir="/Users/tvganesh/backup/software/cricket-package/yorkr-cricsheet/yorkrData2020/bbl/bblBattingBowlingDetails"
rankBBLBowlers(dir=dir,odir=odir,minMatches=25)
## # A tibble: 53 x 4
##    bowler         matches totalWickets meanER
##    <chr>            <int>        <dbl>  <dbl>
##  1 SA Abbott           60           90   8.42
##  2 AJ Tye              45           69   7.32
##  3 B Laughlin          48           66   7.96
##  4 BCJ Cutting         71           63   8.87
##  5 BJ Dwarshuis        54           62   7.87
##  6 MG Neser            54           57   8.36
##  7 Rashid Khan         40           55   6.32
##  8 JP Behrendorff      41           53   6.55
##  9 SNJ O'Keefe         53           52   6.76
## 10 A Zampa             42           51   7.34
## # … with 43 more rows

2a. Ranking Natwest T20 League (NTB) batsman

dir="/Users/tvganesh/backup/software/cricket-package/yorkr-cricsheet/yorkrData2020/ntb/ntbMatches"
odir="/Users/tvganesh/backup/software/cricket-package/yorkr-cricsheet/yorkrData2020/ntb/ntbBattingBowlingDetails"

rankNTBBatsmen(dir=dir,odir=odir,minMatches=20)
## # A tibble: 42 x 4
##    batsman          matches meanRuns meanSR
##    <chr>              <int>    <dbl>  <dbl>
##  1 SR Hain               24     34.6   107.
##  2 M Klinger             26     34.1   118.
##  3 MH Wessels            26     33.9   122.
##  4 DJ Bell-Drummond      21     33.1   112.
##  5 DJ Malan              26     33     129.
##  6 T Kohler-Cadmore      23     33.0   118.
##  7 A Lyth                22     31.4   150.
##  8 JJ Cobb               26     30.7   110.
##  9 CA Ingram             25     30.5   153.
## 10 IA Cockbain           26     29.8   121.
## # … with 32 more rows

2b. Ranking Natwest T20 League (NTB) bowlers

dir="/Users/tvganesh/backup/software/cricket-package/yorkr-cricsheet/yorkrData2020/ntb/ntbMatches"
odir="/Users/tvganesh/backup/software/cricket-package/yorkr-cricsheet/yorkrData2020/ntb/ntbBattingBowlingDetails"

rankNTBBowlers(dir=dir,odir=odir,minMatches=20)
## # A tibble: 23 x 4
##    bowler          matches totalWickets meanER
##    <chr>             <int>        <dbl>  <dbl>
##  1 HF Gurney            23           45   8.63
##  2 AJ Tye               26           40   7.81
##  3 TS Roland-Jones      26           37   8.10
##  4 BAC Howell           20           35   6.89
##  5 TT Bresnan           21           31   8.82
##  6 MJJ Critchley        25           31   7.33
##  7 LA Dawson            24           30   6.80
##  8 TK Curran            23           28   8.19
##  9 NA Sowter            25           28   8.09
## 10 MTC Waller           25           27   7.59
## # … with 13 more rows

3a. Ranking Pakistan Super League (PSL) batsman

dir="/Users/tvganesh/backup/software/cricket-package/yorkr-cricsheet/yorkrData2020/psl/pslMatches"
odir="/Users/tvganesh/backup/software/cricket-package/yorkr-cricsheet/yorkrData2020/psl/pslBattingBowlingDetails"

rankPSLBatsmen(dir=dir,odir=odir,minMatches=15)
## # A tibble: 47 x 4
##    batsman      matches meanRuns meanSR
##    <chr>          <int>    <dbl>  <dbl>
##  1 Babar Azam        40     33.7   102.
##  2 L Ronchi          31     32.9   143.
##  3 DR Smith          24     30.8   111.
##  4 JJ Roy            15     30.6   123.
##  5 Kamran Akmal      46     30.1   112.
##  6 SR Watson         40     29.2   126.
##  7 Shoaib Malik      35     28.1   113.
##  8 Fakhar Zaman      38     27.6   119.
##  9 Imam-ul-Haq       15     27.4   115.
## 10 RR Rossouw        36     27.0   130.
## # … with 37 more rows

3b. Ranking Pakistan Super League (PSL) bowlers

dir="/Users/tvganesh/backup/software/cricket-package/yorkr-cricsheet/yorkrData2020/psl/pslMatches"
odir="/Users/tvganesh/backup/software/cricket-package/yorkr-cricsheet/yorkrData2020/psl/pslBattingBowlingDetails"

rankPSLBowlers(dir=dir,odir=odir,minMatches=15)
## # A tibble: 25 x 4
##    bowler              matches totalWickets meanER
##    <chr>                 <int>        <dbl>  <dbl>
##  1 Wahab Riaz               44           70   6.94
##  2 Hasan Ali                41           61   7.43
##  3 Faheem Ashraf            30           50   7.84
##  4 Mohammad Amir            38           48   7.16
##  5 Usman Shinwari           26           43   8.64
##  6 Mohammad Sami            29           40   7.60
##  7 Shadab Khan              40           38   7.57
##  8 Shaheen Shah Afridi      24           34   7.88
##  9 Rumman Raees             24           33   7.77
## 10 Mohammad Hasnain         16           28   8.65
## # … with 15 more rows

4a. Ranking Women’s Big Bash League (WBB) batsman

dir="/Users/tvganesh/backup/software/cricket-package/yorkr-cricsheet/yorkrData2020/wbb/wbbMatches"
odir="/Users/tvganesh/backup/software/cricket-package/yorkr-cricsheet/yorkrData2020/wbb/wbbBattingBowlingDetails"
rankWBBBatsmen(dir=dir,odir=odir,minMatches=15)
## # A tibble: 36 x 4
##    batsman    matches meanRuns meanSR
##    <chr>        <int>    <dbl>  <dbl>
##  1 BL Mooney       27     46.7  129. 
##  2 SFM Devine      22     43.5  111. 
##  3 EA Perry        16     41.1   97.1
##  4 MM Lanning      19     38     98.2
##  5 JE Cameron      22     32.9  127. 
##  6 DN Wyatt        24     32    112. 
##  7 AE Jones        17     28.9  107. 
##  8 AJ Healy        19     28.4  122. 
##  9 M du Preez      19     27    101. 
## 10 L Lee           18     26.9   98.9
## # … with 26 more rows

4b. Ranking Women’s Big Bash League (WBB) bowlers

dir="/Users/tvganesh/backup/software/cricket-package/yorkr-cricsheet/yorkrData2020/wbb/wbbMatches"
odir="/Users/tvganesh/backup/software/cricket-package/yorkr-cricsheet/yorkrData2020/wbb/wbbBattingBowlingDetails"
rankWBBBowlers(dir=dir,odir=odir,minMatches=15)
## # A tibble: 31 x 4
##    bowler      matches totalWickets meanER
##    <chr>         <int>        <dbl>  <dbl>
##  1 M Strano         23           37   7.25
##  2 DM Kimmince      24           36   7.46
##  3 SJ Coyte         22           29   7.59
##  4 JL Jonassen      24           28   6.81
##  5 SJ Johnson       24           27   6.61
##  6 ML Schutt        22           26   6.03
##  7 SFM Devine       22           24   7.58
##  8 M Brown          23           23   7.33
##  9 M Kapp           19           23   5.05
## 10 H Graham         19           22   7.68
## # … with 21 more rows

Conclusion

yorkr can handle ODI and T20 matches in the format as represented in Cricsheet. In my posts, I have shown how yorkr can be used for Intl. ODI and Intl. T20 for both men and women. yorkr can also handle all T20 formats like IPL T20, BBL, Natwest T20, PSL and women’s BBL. Go ahead take yorkr for a ride and check out your favorite teams and players.

Hope you have fun!!!

You may also like

  1. Getting started with Tensorflow, Keras in Python and R
  2. Computer Vision: Ramblings on derivatives, histograms and contours
  3. Cricpy adds team analytics to its arsenal!!
  4. Sixer – R package cricketr’s new Shiny avatar
  5. Big Data-2: Move into the big league:Graduate from R to SparkR
  6. Practical Machine Learning with R and Python – Part 5
  7. Deep Learning from first principles in Python, R and Octave – Part 7
  8. Exploring Quantum Gate operations with QCSimulator
  9. GooglyPlus: yorkr analyzes IPL players, teams, matches with plots and tables

To see all posts click Index of Posts