π― 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
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
- Parse raw player data strings into structured Python dictionaries
- Type conversion and data validation
- Clean data structure for 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
- Fitness grade assignment (A/B/C/D scale)
- 10% strike rate improvement simulation
- Role balance verification
- Undervalued performer identification
- Player summary cards generation
Lab_01/
β
βββ Task_01.ipynb # Main analysis notebook
βββ data.txt # Raw player data
βββ README.md # Project documentation
βββ .gitignore # Git ignore rules
- Python 3.8 or higher
- Jupyter Notebook or JupyterLab
- Clone the repository:
git clone https://github.com/ZohaibCodez/pakistan-cricket-performance-analysis
cd pakistan-cricket-performance-analysis- Open the notebook:
jupyter notebook Task_01.ipynb- Run all cells sequentially to reproduce the analysis
The notebook addresses 20 comprehensive analysis questions:
- Player Record Conversion - Convert raw data to structured dictionaries
- Count Total Players - Dataset size analysis
- Role-wise Fitness Summary - Average fitness by player role
- Low Fitness Identification - Players with fitness < 75
- Highest Batting Average - Top batting performer
- Lowest Batting Average - Bottom batting performer
- Strike Rate Above 95 - High strike rate players
- Unique Roles Count - Distinct role identification
- Feedback Type Count - Performance feedback distribution
- Overall Team Batting Average - Team-wide batting statistics
- Fitness Grade Assignment - A/B/C/D grading system
- Strike Rate Improvement - 10% improvement projection
- Role Summary - Player count and fitness by role
- Strong Batsmen - Batsmen with average > 50
- Fitness Risk Tag - High Risk vs OK classification
- Sort by Batting Average - Ranked player list
- Undervalued Performers - High average but non-excellent feedback
- Feedback Normalization - Lowercase conversion and counting
- Role Balance Check - Team composition verification
- Player Summary Cards - Individual player reports
- 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
- Python 3.x - Core programming language
- Jupyter Notebook - Interactive development environment
- Built-in Python Libraries:
typing- Type hints for better code clarity
Each player record contains:
id: Unique player identifiername: Player namerole: Position (Batsman/Bowler/All-Rounder/Wicket-Keeper)avg: Batting averagestrike_rate: Strike rate percentagefitness: Fitness score (0-100)feedback: Performance evaluation
# Example player dictionary
{
'id': 1,
'name': 'Babar Azam',
'role': 'Batsman',
'avg': 58.4,
'strike_rate': 88.0,
'fitness': 92.0,
'feedback': 'Excellent'
}This is an academic project. Feedback and suggestions are welcome!
This project is created for educational purposes as part of the Introduction to Data Science (IDS) course.
Created as part of Uni Third Semester - IDS Lab Assignment
- β 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
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Give a βοΈ if this project helped you learn something new!
- GitHub: @ZohaibCodez
- LinkedIn: Zohaib Khan
- Email: itxlevicodez@gmail.com
- 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