Skip to content

ZohaibCodez/pakistan-cricket-performance-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🏏 Pakistan Cricket Team - Player Performance & Fitness Analysis

Python Jupyter License Data Analysis Beginner Friendly

🎯 A comprehensive Python data analysis project that processes and analyzes player performance metrics for the Pakistan Cricket Team using pure Python - no external libraries required!

Keywords: cricket-analytics sports-data-science python-data-analysis fitness-tracking player-statistics beginner-project jupyter-notebook pure-python educational-project data-science-tutorial


πŸ“Š Project Overview

This project analyzes 30 cricket players across various metrics including:

  • Batting Performance: Averages and strike rates
  • Fitness Levels: Fitness scores and risk assessment
  • Player Roles: Batsmen, Bowlers, All-Rounders, and Wicket-Keepers
  • Feedback Analysis: Performance evaluations

🎯 Features

Data Processing

  • Parse raw player data strings into structured Python dictionaries
  • Type conversion and data validation
  • Clean data structure for analysis

Statistical Analysis

  • Player Counts: Total players and role distribution
  • Fitness Metrics: Average fitness by role, low fitness identification, risk tagging
  • Batting Analysis: Highest/lowest averages, strong batsmen identification
  • Strike Rate Analysis: Players above threshold, improvement projections
  • Feedback Distribution: Count and categorization of performance feedback

Advanced Features

  • Fitness grade assignment (A/B/C/D scale)
  • 10% strike rate improvement simulation
  • Role balance verification
  • Undervalued performer identification
  • Player summary cards generation

πŸ“ Project Structure

Lab_01/
β”‚
β”œβ”€β”€ Task_01.ipynb          # Main analysis notebook
β”œβ”€β”€ data.txt               # Raw player data
β”œβ”€β”€ README.md              # Project documentation
└── .gitignore            # Git ignore rules

πŸš€ Getting Started

Prerequisites

  • Python 3.8 or higher
  • Jupyter Notebook or JupyterLab

Installation

  1. Clone the repository:
git clone https://github.com/ZohaibCodez/pakistan-cricket-performance-analysis
cd pakistan-cricket-performance-analysis
  1. Open the notebook:
jupyter notebook Task_01.ipynb
  1. Run all cells sequentially to reproduce the analysis

πŸ“ Analysis Questions Covered

The notebook addresses 20 comprehensive analysis questions:

  1. Player Record Conversion - Convert raw data to structured dictionaries
  2. Count Total Players - Dataset size analysis
  3. Role-wise Fitness Summary - Average fitness by player role
  4. Low Fitness Identification - Players with fitness < 75
  5. Highest Batting Average - Top batting performer
  6. Lowest Batting Average - Bottom batting performer
  7. Strike Rate Above 95 - High strike rate players
  8. Unique Roles Count - Distinct role identification
  9. Feedback Type Count - Performance feedback distribution
  10. Overall Team Batting Average - Team-wide batting statistics
  11. Fitness Grade Assignment - A/B/C/D grading system
  12. Strike Rate Improvement - 10% improvement projection
  13. Role Summary - Player count and fitness by role
  14. Strong Batsmen - Batsmen with average > 50
  15. Fitness Risk Tag - High Risk vs OK classification
  16. Sort by Batting Average - Ranked player list
  17. Undervalued Performers - High average but non-excellent feedback
  18. Feedback Normalization - Lowercase conversion and counting
  19. Role Balance Check - Team composition verification
  20. Player Summary Cards - Individual player reports

πŸ” Key Insights

  • Team Size: 30 players analyzed
  • Role Distribution: Balanced mix of batsmen, bowlers, all-rounders, and wicket-keepers
  • Fitness Levels: Identifies players requiring fitness attention
  • Performance Leaders: Highlights top and bottom performers
  • Team Balance: Verifies adequate role distribution

πŸ› οΈ Technologies Used

  • Python 3.x - Core programming language
  • Jupyter Notebook - Interactive development environment
  • Built-in Python Libraries:
    • typing - Type hints for better code clarity

πŸ“Š Data Format

Each player record contains:

  • id: Unique player identifier
  • name: Player name
  • role: Position (Batsman/Bowler/All-Rounder/Wicket-Keeper)
  • avg: Batting average
  • strike_rate: Strike rate percentage
  • fitness: Fitness score (0-100)
  • feedback: Performance evaluation

πŸ“ˆ Sample Output

# Example player dictionary
{
    'id': 1,
    'name': 'Babar Azam',
    'role': 'Batsman',
    'avg': 58.4,
    'strike_rate': 88.0,
    'fitness': 92.0,
    'feedback': 'Excellent'
}

🀝 Contributing

This is an academic project. Feedback and suggestions are welcome!

πŸ“„ License

This project is created for educational purposes as part of the Introduction to Data Science (IDS) course.

πŸ‘€ Author

Created as part of Uni Third Semester - IDS Lab Assignment

🌟 Why This Project?

  • βœ… Pure Python Implementation - Learn without library dependencies
  • βœ… Real-World Dataset - Actual cricket player statistics
  • βœ… 20 Analytical Questions - Comprehensive problem-solving
  • βœ… Beginner-Friendly - Clear explanations for each step
  • βœ… Portfolio-Ready - Professional documentation and structure

🀝 Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.

How to Contribute:

  1. Fork the project
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

⭐ Show Your Support

Give a ⭐️ if this project helped you learn something new!

πŸ“ž Connect

πŸ™ Acknowledgments

  • Pakistan Cricket Team for inspiring the dataset
  • Introduction to Data Science (IDS) Course
  • Open-source community for resources and inspiration

⚑ Built with Python | 🏏 Powered by Data | πŸ“Š Driven by Analytics

Made with πŸ–€ for the data science community

Report Bug Β· Request Feature Β· Ask Question

About

Analyze Pakistan Cricket Team performance with pure Python! 30 players, 20 analyses covering batting averages, strike rates, fitness scores & team composition. Perfect for beginners learning data science. No libraries needed!

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors