Cricbuzz LiveStats Overview Cricbuzz LiveStats is a Streamlit-based web application that provides real-time cricket match statistics and analytics using data from the Cricbuzz API. This project aims to offer an interactive platform for cricket enthusiasts to explore live match updates, top player stats, and perform basic database operations. Features
Display live match data fetched from the Cricbuzz API. Show top batting and bowling statistics. Provide an SQL query interface for analytics. Support CRUD (Create, Read, Update, Delete) operations on player stats. Include a clean and user-friendly interface built with Streamlit.
Setup Instructions Prerequisites
Python 3.0 (Note: This version is outdated; consider upgrading to 3.8+ for full compatibility) Git A code editor (e.g., VS Code)
Installation
Clone the repository:git clone https://github.com/your-username/cricbuzz_livestats.git cd cricbuzz_livestats
Install the required Python packages:pip install -r requirements.txt
Note: Due to Python 3.0's age, some packages may require older versions. Check compatibility and adjust if needed.
Set up your Cricbuzz API key (if required) and configure it in the environment variables or the app.py file.
Running the Application
Start the Streamlit app:streamlit run app.py
Open your browser and navigate to http://localhost:8501 to view the app.
Project Structure
app.py: Main entry point for the Streamlit app. requirements.txt: Lists required Python packages. README.md: Contains project overview and setup instructions. data/: Directory for JSON data files: match_info.json: Match information data. matches_live.json: Live match data. matches_recent.json: Recent match data. matches_upcoming.json: Upcoming match data. matches.json: General match data. series.list.json: List of series data. series_squads.json: Series squads data.
pages/: Contains individual Streamlit pages: home.py: Overview and About the project page. live_matches.py: Displays live match data. top_stats.py: Shows top batting/bowling stats. sql_queries.py: SQL query interface and analytics. crud_operations.py: CRUD operations on player stats.
utils/: Utility files: api_fetch.py: Handles API data fetching logic. db_connection.py: SQL database connection logic. query_stddev.py: Computes standard deviation for query results.
Contributing Contributions are welcome! Please fork the repository and submit a pull request with your changes. Ensure to follow the existing code style and include tests where applicable. License This project is licensed under the MIT License - see the LICENSE file for details. Acknowledgments
Thanks to the Cricbuzz API for providing the data. Streamlit community for the amazing framework.