This project helps you gather and analyze player-wise cricket stats for fantasy cricket applications.
Use the following URL format to fetch player statistics:
https://stats.espncricinfo.com/ci/engine/player/PLAYER_ID.html?class=3;opposition=OPPOSITION_ID;ground=GROUND_ID;template=results;type=batting
- Replace
PLAYER_ID,OPPOSITION_ID, andGROUND_IDwith the appropriate values.
- Use
run2.pyto obtain thePLAYER_ID. - Find
OPPOSITION_IDandGROUND_IDmanually from the ESPN Cricinfo website.
- Organize your Jupyter notebook with the following structure:
- Import Libraries
Import required Python libraries (e.g.,requests,pandas,BeautifulSoup). - Define Helper Functions
Functions for fetching and parsing player stats. - Input Section
Input player, opposition, and venue IDs. - Data Extraction
Use the helper functions to fetch and process data. - Analysis & Visualization
Analyze and visualize the extracted stats. - Conclusion
Summarize findings or next steps.
- Import Libraries
- Ensure all steps are connected: from fetching IDs, extracting data, to analysis and visualization, for a seamless workflow in your Jupyter notebook.