Code Monkey home page Code Monkey logo

determine-cricket-player-ratings's Introduction

Determine Cricket Player Ratings

This is how the player ratings for Indian Cricket League were calculated

Collecting Raw Data

First I went to espncricinfo.com and on every countrys' player page I filtered by T20 active players and then saved the HTML page to the folder CountryPlayerPages. This would not have been required in the past, but now ESPNCricinfo does not have an all players page and the same url can direct to different pages, making it so that downloading the HTML page is needed to keep the structure consistent.

Processing Raw Data

  1. First I wrote a Python script called getCricinfoURLS.py which scraped the website addresses of all the player pages for each country and then wrote them into a csv file.
  2. Next the Python script readCricinfoURLs utilizing the function CricketStatGrabber scraped basic statistics from each of the player pages and wrote them to the csv called playerRecords. It also wrote all URLS that it had errors scraping to a different csv file. This file I checked to make sure there were no important players missed and that the error was due to inconsistent formatting on ESPNCricinfo's side.
  3. After this I uploaded the playerRecords.csv file to Google Sheets that can be accessed here
  4. In the Google Sheets I preformed various functions on the stats to come up with 8 different rating attributes for each player.
  5. After this I downloaded an csv file containing each player's rating. Then the Python script ConvertPlayerRatings turns the csv into a JSON file usable in the actual game.

determine-cricket-player-ratings's People

Contributors

hgaddipati1118 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.