Creating interactive Data-Driven cricket statistics web application

Using Python and Dash Ploty

Nishant Singh
3 min readMay 2, 2021

Board of cricket control in India(BCCI) organizes domestics T20’s (Syed Mushtaq Ali Trophy) and 50–50 over (Vijay Hazare Trophy) tournaments every year. All the IPL franchise monitor the performances in these domestic leagues to pick the best talent available as an IPL team is only as good as the domestic players in it. This dashboard aims to consolidate the data from these domestic tournaments and info graphically present different statistics to help franchisees select the best batter for a particular number. Below I will be touching upon the methodology, technology, and source of data collection.

Data Source

The data can be found on the BCCI website, with tournament stats like Top run-scorer, most wicket, etc available. For scrapping the data from the website, I used python libraries like Beautiful soup and selenium. Apart from the basic statistics available, added three more stats for measuring performance, such as BRPI (Boundary runs per innings) which is a good measure for boundary hitting ability of a player, MRA (Milestone reaching ability) measures how often a batter reaches 50’s or 100’s out of the innings played and outrate, which is the number of times a batter got out of the innings played. An overview of the data from Syed Mushtaq Ali Trophy:

Also, I have segregated the batters into 4 categories: Openers, Middle order, Lower middle order, and Wicket keeper batter.

Infographics Used

The Dashboard includes two graphs, which I have created using plotly. First is a 3D scatter plot which represents Runs, Average, and Strike rate on a 3D plane.

Runs, Average and Strike rate represented on 3D plane

And the second graph is a scatter plot of Boundary Runs per Innings(BRPI) Vs Milestone Reaching Ability(MRA) with the vertical and horizontal lines being the mean of values on both axes.

Boundary Runs per Innings(BRPI) Vs Milestone Reaching Ability(MRA)

Interactive capabilities

The make this into an interactive web application I used Dash plotly. The key parameters which the user can select from are, Series: Syed Mushtaq Ali Trophy or Vijay Hazare Trophy, Year of the Series played: from 2021 to 2019, and the Batter type: opener, Middle order, Lower middle order, Wicketkeeper batter.

For anyone wanting to learn Dash plotly and how to make these interactive web applications should follow Charming Data on youtube and study the documentation associated.

Lastly, deployed the web application on using Heroku: platform as a service (PaaS) that enables developers to build, run, and operate applications entirely in the cloud.

All the code related to the application can be found on my Github profile.

Conclusion

This Dashboard is useful for comparing and finding outlier performaces from these leagues which would be helpful in scouting good players.

Like the above-plotted data is from Syed Mushtaq Ali 2021, and players like A A Barot, Venkatesh Iyer, Jay Bista, and Vivek Singh have both BRPI and MRA higher than the mean of the lot which signifies that they are performed better than others in their category. Please feel free to use the web application and give me any feedback.

Web Application : https://cricstatsdashboard.herokuapp.com/

GitHub : https://github.com/iambolt/cricket_scouting_dashboard

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

No responses yet

Write a response