Skip to content

vaibhav11123/ipl-analytics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

T20 Cricket Analytics

Overview

This repository contains a Jupyter Notebook project analyzing T20 cricket data to provide data-driven insights for optimizing player selection, team strategies, and venue-specific tactics. The analysis leverages performance metrics for batters (runs, strike rates), bowlers (wickets, economy rates), teams (win rates, toss impacts), and venues to enhance win rates and build a competitive T20 team.

Objectives

  • Player Insights: Identify key performers (e.g., V Kohli: 8,014 runs; YS Chahal: 205 wickets) and their roles (anchors, power-hitters, finishers).
  • Team Dynamics: Evaluate team win rates (e.g., Rising Pune: 62.50%) and toss impacts (68.05% fielding-first win rate).
  • Venue Trends: Analyze venue-specific outcomes (e.g., CSK at Chepauk: 68.75%) to tailor strategies.
  • Strategic Recommendations: Provide actionable strategies for roster construction, training, game plans, and fan engagement.

File Structure

  • T20_Cricket_Analysis.ipynb: Main Jupyter Notebook with analysis and visualizations.
  • data/: Directory for datasets (not included; sample data inferred from markdown).
  • visualizations/: Directory for saved visualization outputs (e.g., PNGs of charts).
  • README.md: This file.

Setup Instructions

Clone the Repository

git clone https://github.com/your-username/t20-cricket-analytics.git
cd t20-cricket-analytics

Install Dependencies

Ensure Python 3.8+ is installed. Install required libraries:

pip install jupyter pandas matplotlib seaborn

Launch Jupyter Notebook

jupyter notebook T20_Cricket_Analysis.ipynb

Usage

  • Open T20_Cricket_Analysis.ipynb in Jupyter Notebook.
  • Run markdown cells to view narrative analysis (sections 4.1, 4.2, 4.4).
  • Run code cells to generate visualizations (bar charts, scatter plots, heatmaps, etc.).
  • Replace sample data in code cells with actual datasets (e.g., CSV files for player stats, team win rates) if available.
  • Save visualization outputs to the visualizations/ directory for stakeholder reports.

Analysis Sections

4.1 Player Insights

  • Batters: Total runs (e.g., V Kohli: 8,014) and strike rates (e.g., J Fraser-McGurk: 233.09).
  • Bowlers: Wickets (e.g., YS Chahal: 205) and economy rates (e.g., SW Tait: 159.40).

4.2 Team Insights

  • Performance: Team win rates (e.g., Gujarat Titans: 62.22%) and match volume.
  • Toss Impact: Fielding-first advantage (68.05% win rate).

4.4 Strategic Recommendations

  • Recruitment: Core batters (Kohli), power-hitters (Fraser-McGurk), finishers (Karthik).
  • Training: Spin countering, death bowling, chasing skills.
  • Game Strategy: Fielding-first preference, venue-specific tactics (e.g., spinners at Chepauk).
  • Team Strategies: Tailored plans for top (CSK), mid-tier (KKR), and lower-ranked teams (RCB).
  • Fan Engagement: Leverage home venues (e.g., Chepauk: 68.75% win rate).

Visualizations

The notebook includes the following visualizations (implemented with matplotlib and seaborn):

  • Bar Charts: Top performers (Kohli's runs, Chahal's wickets), team win rates.
  • Scatter Plots: Runs vs. strike rates, wickets vs. economy rates for player trade-offs.
  • Heatmaps: Venue win percentages (e.g., CSK at Chepauk).
  • Pie Charts: Toss outcomes (50.83% toss-win-to-match-win).
  • Stacked Bar Charts: Fielding vs. batting-first wins (377 vs. 177).

To generate visualizations:

  • Run code cells in the notebook.
  • Modify data in code cells if you have actual datasets (e.g., CSV files).
  • Save outputs to visualizations/ using plt.savefig('visualizations/chart_name.png').

Sample Data

The notebook uses sample data inferred from the markdown (e.g., player stats, team win rates). To use real data:

  • Place datasets in the data/ directory.
  • Update code cells to load your data (e.g., pd.read_csv('data/players.csv')).
  • Example datasets needed: player stats (runs, strike rates, wickets, economy), team performance (win rates, matches), venue outcomes.

Contributing

Contributions are welcome! Please:

  1. Fork the repository.
  2. Create a branch (git checkout -b feature/your-feature).
  3. Commit changes (git commit -m "Add your feature").
  4. Push to the branch (git push origin feature/your-feature).
  5. Open a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For questions or feedback, open an issue on GitHub or contact vaibhavsurendrasinghiitd28@gmail.com

About

This repository contains a Jupyter Notebook project analyzing T20 cricket data to provide data-driven insights for optimizing player selection, team strategies, and venue-specific tactics. The analysis leverages performance metrics for batters (runs, strike rates), bowlers (wickets, economy rates), teams (win rates, toss impacts)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors