Who’s scored the most runs in ODI cricket since 1971?

From Sri Lanka to England, from India to the West Indies, the very first cricket ODI (One Day Internationals) took place in 1971. But since then, which player has scored the most runs, total?

Edrich?Chappel?Haynes?Tendulkar?Someone else entirely?

We decided to find out. We’ve compiled the cumulative number of runs for all players in the ODI, every year since 1971 to 2019.

ESPNcricinfo.com holds the stats for number of runs per player, every player, starting from 1971 – this is our starting place too. Using Python’s powerful BeautifulSoup web scraping library, we wrote a script that would traverse the tables on each year’s web page, grab the relevant data (in this case, the name of the player and their number of runs scored), and then move onto the the next year.1971 to 1972 to 1973… to 2018 to 2019.With all the data scraped and saved in lovely clean .csv files, the next step was to do a spot of data transformation. As we’re showing cumulative opposed to individual counts, we had to stack up each player’s runs each year they played. For this, we used another powerful Python library called Pandas.With all the data now in the right mathematical format, it was time for the fun part: visualising the data. Using a similar technique to our Game of Thrones Bar Chart Race published earlier this year, we passed our .csv to a JavaScript (D3.js) program which essentially does the following:

By Jack Merlin Bruce (@JackMerlinBruce)Data Visualisation Designer at Type A Media

Related Posts

Subscribe to our Newsletter