Streamlit Dashboard: Let's analyse how Virat Kohli performs!
Dhanush D

Dhanush D @dhanushdevadiga

About: Web Developer Angular, Django, NestJs, NodeJs, CSS, HTML, Javascript UCD, Belfield

Location:
Dublin
Joined:
Jan 3, 2025

Streamlit Dashboard: Let's analyse how Virat Kohli performs!

Publish Date: Jun 19
54 4

🏏 Player Analytics: An Interactive Dashboard for Cricket Lovers

Hi, I'm Dhanush Devadiga — a front-end developer and passionate analyst. But at the same time, I’m also a cricket enthusiast and a fan of Virat Kohli, arguably the best batsman in the world today.

So, I thought, why not combine my love for cricket and data? That’s how I built Player Analytics, an interactive dashboard to analyze player performance, provide insights, and even predict future outcomes.


GitHub repo: https://github.com/dhanushd1998/streamlit-cricket-performance-dashboard.git
Live Demo: https://dhanushd1998-cricket-performance-dashboard-main-ejl7hp.streamlit.app/
Data Set on Kaggle: https://www.kaggle.com/code/dhanush1998/virat-kohli-performance-dashboard-analytics
youTube: https://lnkd.in/gBy-rdXq

🎨 UI & Design Highlights

  • Page Title: Set to “Player Analytics” for easy tab identification.
  • Favicon: A cricket themed logo serves as a visual identifier.
  • Layout: Wide mode enabled for better screen utilization.
  • Theme: Customized using config.toml to reflect India’s blue jersey and a dark mode aesthetic.
  • Sidebar: Starts collapsed by default and is reserved strictly for navigation via radio buttons.

📊 Understanding the Dashboard

On initial load, the Cricket Performance Dashboard is visible. If you’re not a cricket follower, here’s some context:

Cricket has three primary formats:

  • ODI (One Day Internationals) – the most popular
  • Test Matches – the longest format
  • T20 (Twenty20) – the shortest and most fast-paced

Virat Kohli is a three-format player, so his data spans across all these formats.


🔁 Dynamic Tabs & Metrics

The dashboard allows users to:

  • Switch between formats (ODI, Test, T20) using tabs.
  • Automatically update plots and metrics according to the selected format.

Key Metrics Displayed:

  • Total Runs
  • Matches Played
  • Average Strike Rate
  • Best Score
  • Number of Hundreds (100s)
  • Number of Fifties (50s)

👤 About Tab

This page gives a short introduction of the cricketer being analyzed — essential to establish context for the user.


🔮 Score Predictor

This page showcases cascading filter criteria to introduce predictive analytics.

How it works:

  • Select Match Type, Opposition, and Ground.
  • Based on historical data, the model predicts a potential score.

The filter values are dependent:

  • For example, choosing ODI and England shows Indian or English grounds.
  • Choosing T20 and Ireland filters the ground to Malahide in Ireland.

📋 Interactive Data Table

Features include:

  • Filtering by match type
  • Sorting by date (newest/oldest)
  • Filtering by opposition
  • Year range selection using a slider
  • Download filtered data as CSV

🧪 Example:

Filter for all T20 matches against England and Australia between 2010–2020 — and easily download the results.


📈 Visualizations

1. Area Plot — Runs Scored vs Year

  • Configuration hidden inside a Streamlit expander for a cleaner UI.
  • Allows selection of a year range to analyze performance trends.

2. Spider Plot — Matches by Country

  • Visualize the number of matches played against top N countries.
  • Default is top 6 countries.
  • Helps identify dominant matchups.

3. Bar Plot — Top 5 Scoring Grounds

  • Test: Highest runs at Adelaide
  • ODI: Highest runs at Mirpur

4. Vertical Bar Plot — Runs by Batting Position

  • T20: Highest runs at No. 3 position
  • Test: Highest at No. 4
  • Helps understand role evolution and effectiveness by position.

5. Line Chart — Total Runs Over Time

  • Select a year range to view trends.
  • From 2010–2020: Notable 56.68% dip (possibly due to COVID-19).
  • From 2008–2010: Positive upward trend.

🧠 Why Cricket Analytics Matters

In a billion-dollar sport where every run counts, data-driven insights are crucial. This dashboard transforms raw match data into actionable intelligence.

Cricketlytics (Cricket + Analytics) is on the rise — used by analysts, broadcasters, coaches, and fans alike.


⚠️ Current Drawbacks

  • Data is preloaded from a static CSV
  • No real-time data or API integration
  • Lacks light/dark mode switching
  • Best viewed on desktop, not optimized for mobile yet

🚀 Future Enhancements

  • API Integration for live stats
  • Advanced AI Models for score predictions
  • Add more visualizations (wagon wheels, dismissals, partnerships)
  • Player Comparison Tool
  • Mobile responsiveness / Progressive Web App (PWA)
  • Light/Dark mode toggle
  • Integration with platforms like Paddy Power or BoyleSports for monetization

🏁 Final Thoughts

This project represents the fusion of data, design, and cricket fandom. Whether you’re an analyst, developer, or just a cricket fan — this dashboard has something insightful for you.

“In cricket, your bat talks louder than words. But now, so can your data.”

Feel free to explore the dashboard, offer feedback, or suggest collaborations!


📌 Built using Python, Streamlit, Pandas, and Plotly — powered by a love for cricket and clean UI.

Comments 4 total

  • Mohithraj Kulal
    Mohithraj KulalJun 19, 2025

    Nice information

  • Dotallio
    DotallioJun 19, 2025

    Love the mix of cricket fandom and real analytics here! For those advanced AI predictions - are you looking more at classic ML models or planning to try deep learning too?

  • Collins Dada
    Collins DadaJun 22, 2025

    very cool.

  • gitkit13
    gitkit13Jun 24, 2025

    solid💯

Add comment