-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 23382f9
Showing
29 changed files
with
9,012 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.DS_Store | ||
*.pyc | ||
scripts/*.pyc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
### Toss-up: The Impact of Winning the Toss on Probability of Winning | ||
|
||
We analyze data from nearly 43,000 first-class men's cricket matches -- a near census of the relevant population. And we make a series of discoveries that upend some conventional wisdom, and understanding based on analysis of much smaller datasets --- in fact, one [prominent previous study (pdf)](http://people.stat.sfu.ca/~tim/papers/cricket.pdf) basis its analysis on just about 1% of the data we have. | ||
|
||
#### Data | ||
|
||
* **Match Level Data**: We got our data from [espncricinfo.com](http://espncricinfo.com). We went about downloading and parsing the data a couple of different ways. Gaurav just [scraped and parsed](https://github.com/soodoku/get-cricket-data) the HTML pages. Derek, clearly the sharper of the two, realized that espncricinfo also provides a nice json API and developed [a python module](https://github.com/dwillis/python-espncricinfo). | ||
Aware of the duplication of work, in this repository, we only provide scripts and data that aren't available elsewhere (except for the final dataset we use). These include, a script to [download match ids](scripts/01_download_data.py), [match ids by match type (json)](data/json/), a script for [making the requests and parsing the requests](scripts/02_parse_cric.py) using the json data, and [output for ODI matches](data/odi_partial.csv) based on the script. However, the [final dataset we use](data/final_output.csv) is the same as posted on Gaurav's [repository](https://github.com/soodoku/get-cricket-data). | ||
|
||
* **Rankings Data**: [parse_rankings](scripts/03_parse_rankings.py) gets monthly rankings for ODIs from 1981-2013 and for tests from 1952-2013. ICC changed its site in 2014 so that it only shows the most recent rankings. The script outputs [odi rankings](data/odi_ranks.csv) and [test rankings](data/test_ranks.csv). | ||
|
||
#### Analysis, Write-up, And Figures | ||
|
||
We began by [merging the ranking and the match data](scripts/04_merge_ranking_data.R). We next [analyzed the data](scripts/05_cricket.R). The script produces [these figures](figs/). The tex and pdf files for the final write-up can be found [here](write_up/). | ||
|
||
#### Authors | ||
|
||
Gaurav Sood and Derek Willis | ||
|
||
#### License | ||
|
||
Scripts, figures, and writing are released under [CC BY 2.0](https://creativecommons.org/licenses/by/2.0/). |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
["958421", "914225", "958419", "958417", "914223", "958415", "914221", "953347", "914219", "953345", "914217", "921223", "921221", "921219", "921217", "921215", "881755", "902653", "930585", "930583", "958421", "914225", "958419", "958417", "914223", "958415", "914221", "953347", "914219", "953345", "914217", "921223", "921221", "921219", "921217", "921215", "881755", "902653", "930585", "930583", "930581", "902651", "902649", "930579", "930577", "930573", "916659", "930575", "916657", "931398", "916655", "931396", "915785", "915783", "892047", "892045", "892043", "924639", "924637", "903591", "903589", "903587", "923323", "923321", "919605", "919603", "743975", "798381", "798379", "798377", "798621", "798619", "798615", "848841", "848839", "894293", "860281", "860279", "875557", "875555", "875553", "875551", "875549", "875545", "875541", "885971", "875521", "885969", "875513", "875507", "875501", "872489", "875491", "875489", "872487", "875485", "875481", "875471", "872485", "875467", "875459", "875457", "817205", "817203", "883347", "883345", "883343", "883341", "743953", "876467", "889463", "876465", "876463", "856121", "856119", "868725", "856117", "868723", "858491", "828251", "828249", "828247", "774889", "774887", "774885", "808871", "808869", "808867", "736063", "722337", "722335", "754039", "742617", "797907", "802327", "800063", "801739", "800061", "800059", "754721", "754807", "754719", "754805", "754717", "754803", "754801", "757515", "757513", "757511", "727917", "762497", "762495", "762493", "765973", "765971", "765969", "667731", "693437", "754799", "693435", "754797", "693433", "754795", "754793", "730293", "730285", "730283", "667887", "682965", "683015", "682963", "683013", "718467", "682961", "718465", "683011", "683009", "683007", "683005", "682959", "683003", "682957", "683001", "682955", "682999", "682953", "682997", "682951", "682995", "682949", "682993", "682947", "682991", "682945", "682989", "682943", "682987", "682941", "682985", "682939", "682983", "682937", "682981", "682979", "682977", "682935", "682975", "682973", "682933", "682971", "682931", "682969", "682929", "682967", "682927", "682925", "682923", "682921", "682919", "682917", "682915", "682913", "682911", "682909", "682907", "682905", "682903", "682901", "682899", "682897", "720549", "648683", "636538", "720555", "648681", "636537", "720553", "636536", "648679", "720551", "662759", "720547", "662757", "662755", "662753", "662751", "702143", "702141", "690353", "690351", "636166", "666049", "636165", "666047", "636164", "666045", "707473", "707471", "707469", "698995", "698993", "698991", "698989", "698987", "698985", "698983", "661697", "661695", "657635", "657633", "657631", "660235", "660223", "660209", "660203", "660185", "685729", "660173", "668969", "685727", "668967", "660149", "660113", "660123", "649103", "660107", "649101", "668959", "668519", "668517", "682227", "682225", "668515", "682223", "682221", "682219", "682217", "682215", "630900", "630899", "630898", "630897", "630896", "630895", "630894", "662387", "647247", "662383", "664395", "664295", "664293", "664291", "566938", "593728", "566937", "593727", "593726", "659547", "659545", "635660", "635659", "635658", "640955", "640947", "645647", "645645", "640945", "644941", "639137", "639136", "631574", "627009", "627008", "631573", "566927", "566926", "631944", "631943", "623572", "623571", "592276", "630951", "625900", "625899", "625898", "602477", "592269", "592268", "603246", "603245", "603244", "592273", "593987", "592272", "567367", "603243", "593986", "567366", "603242", "569239", "603404", "573027", "569238", "569237", "573020", "573019", "599665", "599664", "599663", "588499", "588498", "589307", "567355", "589306", "567354", "565811", "567353", "565810", "587476", "584929", "582186", "584928", "584927", "584924", "584923", "533298", "533313", "533297", "533312", "533296", "533311", "584773", "584772", "533295", "533294", "533293", "533292", "533310", "533309", "533291", "533290", "533308", "533307", "533289", "533288", "533306", "533305", "533287", "533286", "533304", "533303", "533285", "533284", "533302", "533301", "533300", "533299", "533283", "533282", "533281", "533280", "533279", "533278", "533277", "533276", "533275", "533274", "533273", "533272", "551597", "551596", "579720", "551595", "534235", "579719", "565820", "579718", "534234", "571150", "551594", "565819", "534233", "551593", "571149", "571148", "567237", "565845", "565844", "555898", "555897", "567401", "567400", "564786", "573672", "567205", "567204", "567073", "567072", "567071", "560922", "560921", "542851", "542850", "562900", "534208", "562899", "565835", "562438", "562437", "560861", "560860", "560859", "560858", "560857", "560844", "560843", "560842", "540174", "556252", "540173", "546477", "552939", "546473", "546470", "552938", "546463", "546462", "552937", "552936", "546442", "546443", "552935", "546418", "546414", "546411", "546410", "549394", "531637", "527692", "531636", "527691", "543885", "549393", "531635", "543884", "549392", "543883", "520599", "527690", "549391", "520598", "527689", "549390", "520597", "527688", "520596", "520595", "518955", "533664", "518954", "533663", "545681", "545680", "533659", "533658", "533657", "538068", "530432", "537770", "537769", "538159", "538158", "538157", "538156", "538155", "538154", "538153", "538152", "527684", "521217", "527683", "527682", "527013", "514024", "527012", "514023", "531982", "529483", "529482", "529481", "529480", "529479", "525817", "525816", "523736", "523735", "522066", "522065", "522064", "522063", "474476", "527768", "527767", "523711", "516205", "516204", "492548", "500574", "492547", "500226", "474466", "500225", "492546", "492545", "500224", "489220", "499433", "499432", "499431", "499430", "489212", "476950", "476949", "476948", "488908", "495076", "488907", "495075", "488906", "474624", "474623", "474622", "446961", "474621", "446960", "474620", "463149", "473920", "476947", "473919", "476946", "473918", "475121", "488206", "475120", "475119", "480430", "480429", "446956", "461565", "478279", "471300", "471299", "471298", "471296", "471297", "471294", "471295", "471292", "471293", "463142", "463141", "426418", "426417", "435844", "435843", "464698", "464697", "426393", "426392", "435852", "450627", "435851", "435850", "452154", "452153", "456992", "456991", "447539", "439146", "412718", "412703", "412717", "412702", "412716", "412701", "412700", "412699", "412715", "412698", "412714", "412697", "412713", "412696", "412712", "412695", "412711", "412694", "412710", "412693", "412709", "412692", "412708", "412691", "412707", "412690", "412706", "412689", "412687", "412705", "412688", "412704", "412681", "412684", "412685", "412686", "412683", "412682", "412680", "412679", "412677", "412678", "452665", "452664", "452663", "439019", "439018", "439017", "439139", "423788", "428064", "423787", "428063", "428070", "406198", "428069", "406197", "428068", "440946", "440945", "439511", "439510", "439507", "439505", "439506", "439499", "439500", "439497", "439495", "406207", "441640", "440219", "423782", "440218", "440100", "440224", "430885", "430884", "387564", "387563", "426724", "426723", "426181", "426180", "426179", "423391", "423390", "423389", "424251", "424244", "403386", "403385", "350051", "350050", "403375", "410398", "401076", "410576", "410574", "391794", "356017", "355990", "356016", "355989", "356015", "355988", "356014", "355986", "356013", "355987", "356011", "355985", "356012", "355984", "356010", "355982", "356009", "355983", "356008", "355981", "356007", "355980", "356006", "355979", "356005", "355978", "356004", "355977", "356003", "355976", "356001", "356002", "356000", "355999", "355998", "355997", "355996", "355995", "355994", "355993", "355992", "355991", "403914", "403913", "403912", "403415", "403412", "403419", "392615", "350476", "350475", "352674", "366622", "386494", "351696", "369334", "386535", "372946", "372945", "351695", "351694", "366708", "366707", "350347", "369333", "361660", "361659", "361658", "361657", "361656", "361655", "361654", "361653", "320237", "320231", "320229", "320230", "296913", "354461", "354460", "354459", "361531", "361530", "354458", "354457", "354456", "354455", "354454", "354453", "351361", "351439", "351438", "351357", "319142", "296903", "343764", "315773", "300436", "300435", "291356", "312444", "298804", "319112", "291343", "298795", "297800", "287879", "287878", "287877", "287876", "287875", "287874", "287873", "287872", "287871", "287870", "287869", "287868", "287867", "287866", "287865", "287864", "287863", "287862", "287861", "287860", "287859", "287858", "287857", "287856", "287855", "287854", "287853", "306991", "306989", "306987", "276969", "276968", "276967", "306555", "299421", "291326", "258464", "258463", "255957", "249227", "251488", "251487", "255954", "264065", "252991", "225263", "225163", "225271", "238195", "237242", "226374", "222678", "217862", "211028"] |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.