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?
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.
Convert the .csv to .json
For 1971, create a horizontal bar chart for the top 10 highest scoring cricketers
For the following year, do the same
Animate the steps between the first and second bar chart (an animation technique called 'tweening')
Repeat this tweening for every year and every bar chart in the dataset
Add some cool, epic music that you might hear during a sporting event
If you have any ideas for other bar chart races, let us know below.
✉️ Sign up to the weekly search newsletter: https://email.typeamedia.net
A free information pack with all this weeks search news, google updates and insider tips to circulate round your team to keep them informed.
🎙️ Our podcast: https://anchor.fm/canonical-chronicle
💻 Our website beautifully tagged up with UTM parameters: https://typeamedia.net/?utm_source=youtube
I’m Ross Tavendale, the managing director of Type A Media, a creative search agency based in London. I make videos about business leadership, web technology, SEO, PPC and how I turned being a Type A personality into a business.
I’d love to hear from you. Tweeting @rtavs on twitter is the quickest way to get a response or you can email me on [email protected]