How pankajrawat9075/fantasy-sports-prediction works
Project type and purpose
• This is a standalone Python‐based data pipeline and analytics tool (“Player Prediction Predictor”) that:
• Ingests ball‐by‐ball and match metadata (YAML files from Cricsheet)
• Extracts and aggregates per‐match and career statistics for batsmen and bowlers
• Runs predictive functions to forecast runs or wickets for a given player or match
• It is not a web service; it’s an “open‐source analytical pipeline” with a CLI entrypoint (run.py).
File structure
• Top-level files
• run.py: CLI or orchestration entry point
• requirements.txt: Python dependencies
• team maker.py, team.csv: small utility for team composition
• Raw data folder
• odis/… .yaml: one file per match (2005–2019)
• Data acquisition scripts (scripts/*.py)
• batsman_data_acquisition.py, bowler_data_acquisition.py
• player_performance.py
• Processed data folder
• player_details/*.xlsx: aggregated Excel spreadsheets
• GitHub CI config in .github/workflows/python-package-conda.yml
README for additional insights
• Describes two main functions:
1. Per‐player performance prediction
2. Per‐team match outcome and best XI selection
• Explains features extracted at two levels:
• Overall career stats
• Per‐match stats
• Confirms data source, period, and the kind of statistics produced
a. Main components:
1. Raw Data Store: “odis/” folder of YAML files
2. ETL Layer (Data Acquisition Scripts):
– batsman_data_acquisition.py
– bowler_data_acquisition.py
– player_performance.py
3. Processed Data Store: “player_details/” Excel files & “team.csv”
4. Prediction Engine (Business Logic): run.py + any internal modules/functions
5. External Libraries & Runtime:
– PyYAML for parsing
– Pandas for tabular processing
– NumPy, Scikit-learn (if used for modeling)
6. User Interface: CLI arguments, console output, generated CSV/XLSX results
b. Relationships & data flows:
c. Architectural patterns & principles:
– Layered pipeline (extract → transform → load → predict)
– Separation of concerns:
• Data ingestion vs. data storage vs. prediction logic
– Modular scripts allowing easy extension (e.g., add new feature extractors)
d. Key technologies:
– Python 3.x
– PyYAML, Pandas, NumPy
– Excel I/O (openpyxl or xlrd via Pandas)
– (Optionally) scikit-learn or similar for model training/inference
Detail
• Team maker utility and run.py orchestrator as separate entrypoint nodes