This project is a Cricket Data Management System designed to handle cricket match data from Cricsheet. It provides a robust backend infrastructure for storing, retrieving, and managing cricket match information.
The data for this project is sourced from Cricsheet, a website that provides ball-by-ball data for international and T20 league cricket matches in a machine-readable format.
Cricsheet data is available under a CC BY-SA 4.0 license. This means you are free to use, modify, and distribute the data, provided you give appropriate credit and share any derivative works under the same license.
The system uses the following main models to represent cricket data:
- RawMatch: Stores the raw JSON data for each match.
- MatchDetails: Contains processed match information such as teams, dates, and venue.
- PlayingXI: Represents the playing eleven for each team in a match.
These models are defined in the domains folder:
raw_matches.py: Defines the RawMatch modelmatch_details.py: Defines the MatchDetails modelplaying_xi.py: Defines the PlayingXI model
To ingest new data into the system:
-
Prepare the Cricsheet data URL. For example:
https://cricsheet.org/downloads/ipl_json.zip -
Run the ingestion script:
python ingestion.py --url https://cricsheet.org/downloads/ipl_json.zipThis will download the ZIP file, extract the JSON files, and ingest them into the database.
-
The script will process each JSON file and populate the RawMatch, MatchDetails, and PlayingXI models accordingly.