Learn R Programming

yorkr

This R package can be used to analyze performances of cricketers based on match data from Cricsheet. The yorkr package can handle match data from ODIs, Twenty20s and IPL T20s from Cricsheet. The data has to be in yaml format

The package can be installed directly from CRAN as follows

install.packages("yorkr") library(yorkr)

The latest updates can be installed directly from Github library(devtools) install_github("tvganesh/yorkr") library(yorkr)

For details on how to use the yorkr package please see my posts

  1. Introducing cricket package yorkr-Part1:Beaten by sheer pace!.
  2. Introducing cricket package yorkr: Part 2-Trapped leg before wicket!
  3. Introducing cricket package yorkr: Part 3-Foxed by flight!
  4. Introducing cricket package yorkr:Part 4-In the block hole!
  5. yorkr pads up for the Twenty20s: Part 1- Analyzing team"s match performance.
  6. yorkr pads up for the Twenty20s: Part 2-Head to head confrontation between teams
  7. yorkr pads up for the Twenty20s:Part 3:Overall team performance against all oppositions!
  8. yorkr pads up for Twenty20s:Part 4- Individual batting and bowling performances!
  9. yorkr crashes the IPL party ! – Part 1
  10. yorkr crashes the IPL party ! – Part 2
  11. yorkr crashes the IPL party ! – Part 3
  12. yorkr crashes the IPL party! – Part 4

Copy Link

Version

Install

install.packages('yorkr')

Monthly Downloads

221

Version

0.0.42

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Tinniam Ganesh

Last Published

March 24th, 2024

Functions in yorkr (0.0.42)

bowlerDeliveryWickets

Number of deliveries to wickets
batsmanVsBowlerPerf

Performance of batsman vs bowler
bowlerCumulativeAvgEconRate

Bowler's cumulative average economy rate
bowlerMeanEconomyRate

Mean economy rate versus number of overs
bowlerMovingAverage

Bowler's moving average of wickets
bowlerWicketsAgainstOpposition

Bowler wickets versus different teams
bowlerCumulativeAvgWickets

Bowler's cumulative average wickets
batsmanWinProbDL

Plot the batsman win probability contribution using Deep Learning model
bowlerMeanRunsConceded

Mean runs conceded versus overs
bowlerVsBatsmanPerf

Performance of bowler vs batsman
batsmanWinProbLR

Plot the batsman win probability using Logistic Regression model
bowlerWinProbDL

Plot the Bowler win probability contribution using Deep Learning model
bowlerWicketsVenue

Bowler performance at different venues
bowlerWktsPredict

Predict the deliveries required to wickets
convertYaml2RDataframe

Converts and save yaml files to dataframes
convertYaml2RDataframeT20

Converts and save T20 yaml files to dataframes
convertAllYaml2RDataframesT20

Convert and save all T20 Yaml files to dataframes
bowlerWinProbLR

Plot the bowler win probability using Logistic Regression model
getAllMatchesAllOpposition

Get data on all matches against all opposition
convertAllYaml2RDataframes

Convert and save all Yaml files to dataframes
getIPLBattingDetails

Gets the IPL batting details
getCPLBattingDetails

Gets the CPL batting details
getBBLBowlingDetails

Gets the BBL bowling details
getBowlerWicketDetails

Get the bowling details of a bowler
getIPLBowlingDetails

Gets the IPL bowling details
getSSMBowlingDetails

Gets the SSM bowling details
getT20BattingDetails

Gets the T20 batting details
getSSMBattingDetails

Gets the SSM batting details
getAllMatchesBetweenTeams

Get data on all matches between 2 opposing teams
getBBLBattingDetails

Gets the BBL batting details
getPSLBowlingDetails

Gets the PSL bowling details
getWBBBowlingDetails

Gets the WBB bowling details
getDeliveryWickets

Get datframe of deliveries bowled and wickets taken
getNTBBattingDetails

Gets the NTB batting details
globals

globals.R
getMatchDetails

Get match details of 2 countries
getCPLBowlingDetails

Gets the CPL bowling details
helper

Gets min,max date and min and max matches from dataframe
helper3

Gets min,max date and min and max matches from dataframe for the year
helper1

Gets min,max date and min and max matches from dataframe from the year
helper2

Gets min,max date and min and max matches from dataframe
getODIBowlingDetails

Gets the ODI bowling details
getBatsmanDetails

Get batting details of batsman from match
getNTBBowlingDetails

Gets the NTB bowling details
getTeamBowlingDetails

Get the team bowling details
getT20BowlingDetails

Gets the T20 bowling details
matchWormGraph

Plot the match worm graph
getWBBBattingDetails

Gets the WBB batting details
getODIBattingDetails

Gets the ODI batting details
getPSLBattingDetails

Gets the PSL batting details
matchWormWicketGraph

Plot the match worm wicket graph
getTeamBattingDetails

Get team batting details
overallRunsSRPPowerplayPlotT20

Plot the Runs vs SR in power play of T20 batsmen
overallRunsSRPlotT20

Plot the Runs vs SR of Intl. T20 batsmen
overallWicketsERPowerPlayPlotT20

Plot the Wickets vs ER in power play of Intl. T20 batsmen
overallWicketsERPlotT20

Ranks the T20 bowlers
overallRunsSRMiddleOversPlotT20

Plot the Runs vs SR in middle overs of Intl. T20 batsmen
overallRunsSRDeathOversPlotT20

Plot the Runs vs SR in death overs of Intl. T20 batsmen
plotWinLossTeamVsAllTeams

Plot wins for each team
saveAllMatchesAllOppositionCPLT20

Saves matches against all CPL teams as dataframe for an CPL team
saveAllMatchesAllOppositionBBLT20

Saves matches against all BBL teams as dataframe for an BBL team
plotWinLossBetweenTeams

Plot wins for each team
saveAllMatchesAllOppositionWBBT20

Saves matches against all WBB teams as dataframe for an WBB team
rankODIBatsmen

Ranks the ODI batsmen
rankT20Batsmen

Ranks the T20 batsmen
overallWicketsERDeathOversPlotT20

Plot the Wickets vs ER in death overs of Intl. T20 batsmen
parseYamlOver

Parse yaml file and convert to dataframe
rankODIBowlers

Ranks the ODI bowlers
saveAllMatchesAllOppositionSSMT20

Saves matches against all SSM teams as dataframe for an SSM team
saveAllMatchesAllOppositionIPLT20

Saves matches against all IPL teams as dataframe for an IPL team
overallWicketsERMiddleOversPlotT20

Plot the Wickets vs ER in middle overs of Intl. T20 batsmen
saveAllMatchesAllOppositionPSLT20

Saves matches against all PSL teams as dataframe for an PSL team
saveAllMatchesAllOppositionNTBT20

Saves matches against all NTB teams as dataframe for an NTB team
rankT20Bowlers

Ranks the T20 bowlers
saveAllMatchesBetweenTeams

Saves all matches between 2 teams as dataframe
saveAllT20BattingDetails

Save all T20 batting details
specialProc

Used to parse yaml file
teamBatsmenPartnershiOppnAllMatches

Team batting partnership against a opposition all matches
saveAllMatchesBetween2BBLTeams

Saves all matches between 2 BBL teams as dataframe
teamBatsmenPartnershipAllOppnAllMatches

Team batting partnership in all matches all oppositions
teamBatsmenPartnershipAllOppnAllMatchesPlot

Plots team batting partnership all matches all oppositions
saveAllT20MatchesAsDF

Overall picture Ranks the T20 batsmen
saveAllT20BowlingDetails

Save all T20 batting details
saveAllMatchesBetween2NTBTeams

Saves all matches between 2 NTB teams as dataframe
teamBattingScorecardMatch

Team batting scorecard of a team in a match
saveAllMatchesAllOpposition

Saves matches of all opposition as dataframe
saveAllMatchesBetween2PSLTeams

Saves all matches between 2 PSL teams as dataframe
teamBattingScorecardAllOppnAllMatches

Team batting scorecard against all oppositions in all matches
teamBattingPerfDetails

Gets the team batting details.
teamBatsmenVsBowlersOppnAllMatches

Team batsmen vs bowlers all matches of an opposition
teamBatsmenVsBowlersMatch

Team batsmen against bowlers in a match
saveAllMatchesBetween2WBBTeams

Saves all matches between 2 WBB teams as dataframe
saveAllMatchesBetween2CPLTeams

Saves all matches between 2 CPL teams as dataframe
saveAllMatchesBetween2IPLTeams

Saves all matches between 2 IPL teams as dataframe
saveAllMatchesBetween2SSMTeams

Saves all matches between 2 SSM teams as dataframe
teamBatsmenPartnershipMatch

Team batting partnerships of batsmen in a match
teamBatsmenPartnershipOppnAllMatchesChart

Plot of team partnership all matches against an opposition
teamBowlersVsBatsmenOppnAllMatches

Team bowlers vs batsmen against an opposition in all matches
teamBowlersWicketKindOppnAllMatches

Team bowlers wicket kind against an opposition in all matches
teamBattingScorecardOppnAllMatches

Team batting scorecard of a team in all matches against an opposition
teamBowlingPerfDetails

get team bowling performance details
teamBowlersVsBatsmenAllOppnAllMatchesRept

report of Team bowlers vs batsmen against all opposition all matches
teamBatsmenVsBowlersAllOppnAllMatchesPlot

Plot of Team batsmen vs bowlers against all opposition all matches
teamBowlersVsBatsmenAllOppnAllMatchesPlot

Plot bowlers vs batsmen against all opposition all matches
teamBowlersVsBatsmenAllOppnAllMatchesMain

Compute team bowlers vs batsmen all opposition all matches
teamBowlersWicketRunsOppnAllMatches

Team bowlers wicket runs against an opposition in all matches
teamBowlersWicketsOppnAllMatches

Team bowlers wickets against an opposition in all matches
teamRunSRDeathOversPlotOppnAllMatches

Team batting plots runs vs SR in death overs for team against opposition in all matches
teamERAcrossOvers

Compute the ER in powerplay, middle and death overs
teamBatsmenVsBowlersAllOppnAllMatchesRept

Report of team batsmen vs bowlers in all matches all oppositions
teamBowlingScorecardAllOppnAllMatches

Team bowling scorecard all opposition all matches
teamBowlersVsBatsmenMatch

Team bowlers vs batsmen in a match
teamERAcrossOversAllOppnAllMatches

Compute the ER by team against all team in powerplay, middle and death overs in all matches
teamRunSRDeathOversPlotMatch

Team batting plots runs vs SR in death overs for team in match
teamBowlingScorecardAllOppnAllMatchesMain

Team bowling scorecard all opposition all matches Main
teamBowlingWicketRunsAllOppnAllMatches

Team bowling wicket runs all matches against all oppositions
teamBowlingWicketRunsMatch

Team bowling wickets runs conceded in match
teamBowlingWicketMatch

Compute and plot wickets by bowlers in match
teamBowlingWicketKindMatch

Compute and plot the wicket kinds by bowlers in match
teamRunsAcrossOversAllOppnAllMatches

Compute the runs by team against all team in powerplay, middle and death overs
teamSRAcrossOversOppnAllMatches

Compute the strike rate by team against team in powerplay, middle and death overs in all matches
teamWicketERDeathOversPlotOppnAllMatches

Team wickets vs ER in death overs against opposition all matches
teamRunsSRPowerPlayPlotMatch

Team batting plots runs vs SR in powerplay for team in match
teamRunsAcrossOvers

Compute the runs in powerplay, middle and death overs
teamERAcrossOversOppnAllMatches

Compute the ER by team against team in powerplay, middle and death overs in all matches
teamSRAcrossOversAllOppnAllMatches

Compute the strike rate by team against all team in powerplay, middle and death overs in all matches
teamRunSRDeathOversPlotAllOppnAllMatches

Team batting plots runs vs SR in death overs for team against all oppositions in all matches
teamRunsSRPowerPlayPlotOppnAllMatches

Team batting plots runs vs SR in powerplay for team against opposition in all matches
teamRunsSRPMiddleOversPlotMatch

Team batting plots runs vs SR in middle overs for team in match
teamSRAcrossOvers

Compute the Strike Rate in powerplay, middle and death overs
teamRunsSRPlotAllOppnAllMatches

Team batting plots runs vs SR for team against all oppositions in all matches
teamRunsSRPlotMatch

Team Runs vs SR in match
teamRunsSRPMiddleOversPlotOppnAllMatches

Team batting plots runs vs SR in middle overs for team against opposition in all matches
teamRunsSRPlotOppnAllMatches

Team batting Runs vs SR against oppositions in all matches
teamWicketsERPlotAllOppnAllMatches

Team wickets vs ER against all opposition all matches
teamWicketsERMiddleOversPlotMatch

Team wickets vs ER in middle overs against opposition in match
teamWicketsERPlotOppnAllMatches

Team wickets vs ER against all opposition all matches
teamWicketsERPlotMatch

Team wickets vs ER against in match
teamWicketsAcrossOversAllOppnAllMatches

Compute the wickets by team against all team in powerplay, middle and death overs in all matches
teamWicketsAcrossOversOppnAllMatches

Compute the wickets by team against team in powerplay, middle and death overs in all matches
topWicketsBowlerAcrossOversAllOppnAllMatches

Compute the most wickets by bowlers against all team in powerplay, middle and death overs
teamRunsSRPowerPlayPlotAllOppnAllMatches

Team batting plots runs vs SR in powerplay for team against all oppositions in all matches
teamBowlingWicketKindAllOppnAllMatches

team bowling wicket kind against all opposition all matches
teamWicketsERPowerPlayPlotMatch

Team wickets vs ER in powewrplay against opposition in match
teamWicketsERPowerPlayPlotAllOppnAllMatches

Team wickets vs ER in powewrplay against all opposition all matches
teamWicketERMiddleOversPlotAllOppnAllMatches

Team wickets vs ER in middle overs against all opposition all matches
teamRunsAcrossOversOppnAllMatches

Compute the runs by team against team in powerplay, middle and death overs
teamBowlingPerfOppnAllMatches

team bowling performance all matches against an opposition
teamRunsSRMiddleOversPlotAllOppnAllMatches

Team batting plots runs vs SR in middle overs for team against all oppositions in all matches
teamBowlingScorecardMatch

Compute and return the bowling scorecard of a team in a match
teamWicketERMiddleOversPlotOppnAllMatches

Team wickets vs ER in middle overs against a pposition all matches
teamWicketERPowerPlayPlotOppnAllMatches

Team wickets vs ER in powewrplay against opposition all matches
topWicketsBowlerAcrossOversOppnAllMatches

Compute the best ER by bowlers against team in powerplay, middle and death overs
teamWicketsERDeathOversPlotAllOppnAllMatches

Team wickets vs ER in death overs against all opposition all matches
topSRBatsmenAcrossOversAllOppnAllMatches

Compute the highest SR by batsmen against all team in powerplay, middle and death overs
topSRBatsmenAcrossOversOppnAllMatches

Compute the highest SR by batsmen against team in powerplay, middle and death overs
teamWicketsERDeathOversPlotMatch

Team wickets vs ER in death overs against opposition in match
winProbabilityDL

Plot the win probability using Deep Learning model
topRunsBatsmenAcrossOversOppnAllMatches

Compute the most runs scored by batsmen against team in powerplay, middle and death overs
topRunsBatsmenAcrossOversAllOppnAllMatches

Compute the most runs scored by batsmen against all team in powerplay, middle and death overs
winProbabilityGAN

Plot the win probability using GAN model
teamWicketsAcrossOvers

Compute the wickets in powerplay, middle and death overs
winProbabilityLR

Plot the win probability using Logistic Regression model
winProbabilityRF

Plot the win probability using Random Forest model
topERBowlerAcrossOversAllOppnAllMatches

Compute the best ER by bowlers against all team in powerplay, middle and death overs
topERBowlerAcrossOversOppnAllMatches

Compute the best ER by bowlers against team in powerplay, middle and death overs
batsmanRunsAgainstOpposition

Batsman runs against different oppositions
batsmanFoursSixes

Batsman's total runs, fours and sixes
batsmanCumulativeStrikeRate

Batsman's cumulative average strike rate
batsmanMovingAverage

Moving average of batsman
batsmanRunsVenue

Batsman runs at different venues
batsmanDismissals

Dismissal type of batsmen
batsmanRunsVsStrikeRate

Batsman runs versus strike rate
batsmanRunsPredict

Predict deliveries to runs scored
batsmanRunsVsDeliveries

Runs versus deliveries faced
batsmanCumulativeAverageRuns

Batsman's cumulative average runs