An interactive IPL (Indian Premier League) analytics dashboard built with Streamlit. Explore team performance, batsman and bowler stats, boundary analysis, and Orange Cap holders across IPL seasons 2008–2019.
Features · Modules · Installation · Usage · Dataset · Project Structure
- 📊 7 analysis modules accessible from the sidebar
- 🎯 Filterable views — drill down by team, player, season, or boundary type
- 📈 Rich visualizations using both Matplotlib and Plotly (bar, line, pie, area, scatter, histogram)
- 🏆 Season winners and win count comparisons across all IPL franchises
- 🦾 Orange Cap tracker — top run-scorer per season, visualized with a scatter plot
- 🏏 Per-batsman breakdown — runs scored against each bowling team
- 🎳 Bowler analysis — total runs conceded with pie and line charts
- 🔴 Boundary analysis — fours and sixes comparison with dual-line overlay chart
- Ranks all IPL teams by total matches played
- Displays results in a sortable table
- Visualized with a Matplotlib line chart and an interactive Plotly line chart
- Filter by season and/or winning team using sidebar dropdowns
- Shows the IPL winner for each season in a bar chart
- Displays total number of IPL title wins per team in a second bar chart
- Filter to a specific batsman or view the Overall Top 25
- Total runs scored across IPL seasons 2008–2019
- Vertical and horizontal bar charts for easy comparison
- Filter to a specific bowler or view the Overall Top 25
- Total runs conceded across seasons
- Plotly line chart and pie chart showing run distribution among top 25 bowlers
- Filter by run type (4 or 6) and batsman
- Histogram of fours hit by all batsmen
- Area chart of top 25 six-hitters
- Dual-line overlay chart comparing fours vs. sixes for top batsmen
- Select any batsman to see their runs against each bowling team
- Table + Plotly chart rendered from the
helper.batsman_scored()function
- Filter by season or view all seasons at once
- Table of Orange Cap winners per season
- Scatter plot with encoded Y-axis showing which batsman won the Orange Cap in each season
ipl-analysis/
│
├── app.py # Main Streamlit dashboard
├── helper.py # All data processing & chart helper functions
│
├── IPL-anaylsis/
│ ├── deliveries(1).csv # Ball-by-ball delivery data
│ └── matches(1).csv # Match-level data (teams, venue, winner, season)
│
└── requirements.txt # Python dependencies
| Function | Description |
|---|---|
Most_Played_Team(Matches) |
Count matches played per team |
Season_Winner(Matches) |
Extract unique seasons and winners for dropdowns |
fetch_Season_Winner(Matches, season, winner) |
Filter season winner data |
Batsman_Run(Deliveries) |
Get list of batsmen for dropdown |
fetch_Batsman_Run(Deliveries, batsman) |
Fetch runs for a selected batsman |
Bolwer_Run(Deliveries) |
Get list of bowlers for dropdown |
fetch_Bowler_Run(Deliveries, bowler) |
Fetch runs conceded by a selected bowler |
boundry(Deliveries) |
Get boundary run types and batsmen for dropdowns |
count_boundaries(Deliveries, run, batsman) |
Filter boundary data |
batsman(Deliveries) |
Get all batsman names |
batsman_scored(Deliveries, name) |
Return a Plotly chart for a batsman's runs vs teams |
season(Matches) |
Get all seasons for dropdown |
orange_cap_holder(Deliveries, Matches, season) |
Find Orange Cap winner per season |
- Python 3.9 or higher
git clone https://github.com/your-username/ipl-analysis.git
cd ipl-analysispython -m venv venv
# Linux / macOS
source venv/bin/activate
# Windows
venv\Scripts\activatepip install -r requirements.txtstreamlit run app.pyOpen your browser at http://localhost:8501.
- Use the sidebar radio menu to select an analysis module
- Use the sidebar dropdowns to filter by team, player, or season
- View interactive Plotly charts and data tables in the main panel
The app uses two CSV files covering IPL seasons 2008–2019:
| Column | Description |
|---|---|
match_id |
Unique match identifier |
batsman |
Batsman on strike |
bowler |
Bowler delivering the ball |
batsman_runs |
Runs scored by the batsman off that ball |
total_runs |
Total runs off that ball (including extras) |
bowling_team |
Team bowling |
| Column | Description |
|---|---|
id |
Unique match identifier |
season |
IPL season year |
team1 |
Home team |
team2 |
Away team |
winner |
Winning team |
Data source: Kaggle — IPL Dataset
streamlit
pandas
matplotlib
plotly
Install all at once:
pip install streamlit pandas matplotlib plotly- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature - Commit your changes:
git commit -m 'Add your feature' - Push to the branch:
git push origin feature/your-feature - Open a Pull Request
This project is licensed under the MIT License. See LICENSE for details.
Built with ❤️ using Streamlit · Plotly · Pandas · IPL Dataset 2008–2019