A real-time cricket analytics dashboard built using Streamlit, MySQL, and the Cricbuzz RapidAPI feed. This project demonstrates a production-style data pipeline with API ingestion, transformation, storage, and interactive visualization.
- Real-time match listings (live + recent)
- Venue, match status, and result details
- Innings-wise score summary
- Detailed batting and bowling scorecards
- Top batters by total runs
- Top bowlers by wickets
- Leaderboards powered by SQL aggregations
- 25 pre-built SQL practice queries
- Read-only custom SQL runner
- Real-world cricket dataset for analysis
- Insert, update, and delete player records
- Manage match-level data
- Fetches live and recent matches from API
- Stores matches, innings, batting, and bowling data in MySQL
- Optimized refresh logic to avoid redundant API calls
Cricbuzz API → Python ETL → MySQL Database → Streamlit Dashboard
- Python
- Streamlit
- MySQL
- pandas
- requests
- RapidAPI (Cricbuzz API)
Cricbuzz_LiveStats/
│
├── app.py # Main Streamlit app
├── run_refresh.py # Data pipeline (ETL)
├── requirements.txt
├── README.md
│
├── pages/ # Streamlit pages
├── services/ # API + parsing + business logic
├── utils/ # DB + logging utilities
├── sql/ # Schema + analytics queries
pip install -r requirements.txtCreate a .env file based on .env.example:
RAPIDAPI_HOST=cricbuzz-cricket.p.rapidapi.com
RAPIDAPI_KEY=your_api_key_here
DB_HOST=localhost
DB_PORT=3306
DB_USER=root
DB_PASSWORD=your_password
DB_NAME=cricbuzz_livestatsmysql -u root -p cricbuzz_livestats < sql/schema.sqlpython run_refresh.pystreamlit run app.py- Contains 25 real-world analytical queries
- Located in:
sql/analytics_queries.sql - Integrated into the SQL Analytics page
- API usage is limited by RapidAPI quota
- Some matches may not have scorecards (e.g., toss/preview stage)
- Application falls back to stored database data if API is unavailable
Add screenshots in an assets/ folder:
assets/Home.png
assets/Live.png
assets/Top Players.png
assets/Playing XI.png
assets/Commentary.png
Md Sahid Raza [sahidraza2000@gmail.com] +91 7205514001