How vikhayatrana0110-crypto/footyforecast works
FootyForecast turns historical international match results into Elo and rolling team/match features, trains outcome and goals models, then serves predictions with probabilities, expected goals, and SHAP explanations in Streamlit. The pipeline entry point owns the offline stages; the app owns interactive inference and presentation. README capabilities fill in the UI and schema layers where source excerpts are partial, so uncertain internal wiring is omitted.
Main entry points: run_pipeline.py Pipeline runner · db_manager.py Database manager · streamlit_app.py Streamlit interface · download_data.py Results ingestion
Components 21
Data pipeline
- Pipeline runner
run_pipeline.py - Results ingestion
src/ingestion/download_data.py - Results CSV
- StatsBomb enrichment
src/ingestion/statsbomb_loader.py - Database manager
src/database/db_manager.py - Database schema models
src/database/models.py - Layered schema
sql/schema.sql
Feature engineering
- Elo ratings
src/features/elo_calculator.py - Team rolling features
src/features/team_features.py - Match features
src/features/match_features.py
Modeling
- Model training
src/models/trainer.py - Trained models
src/app/models
Prediction app
- Streamlit interface
src/app/streamlit_app.py - Match predictor
src/models/predictor.py - SHAP explanations
src/models/explainer.py - Deployment results
src/app/data/raw/results.csv
Other components
- Pipeline operator
- App user
- Historical results source
- StatsBomb
- PostgreSQL database
Connections 25
- Pipeline operator → Pipeline runner: runs
- Pipeline runner → Results ingestion: calls
- Results ingestion → Historical results source: downloads
- Results ingestion → Results CSV: writes
- Results ingestion → Database manager: loads matches
- Pipeline runner → Database manager: reads and saves
- Database manager → PostgreSQL database: queries and writes
- Database manager → Database schema models: uses mappings
- Layered schema → PostgreSQL database: defines layers
- Pipeline runner → Elo ratings: computes ratings
- Pipeline runner → Team rolling features: computes rolling stats
- Pipeline runner → Match features: builds feature vectors
- Team rolling features → Match features: provides team stats
- Pipeline runner → Model training: trains models
- Model training → Trained models: saves artifacts
- App user → Streamlit interface: uses
- Streamlit interface → Database manager: reads and saves
- Streamlit interface → Match predictor: requests prediction
- Match predictor → Match features: builds prediction features
- Match predictor → Trained models: loads models
- Streamlit interface → SHAP explanations: requests explanations
- SHAP explanations → Database manager: saves SHAP records
- Streamlit interface → Deployment results: loads deployment data
- StatsBomb enrichment → StatsBomb: fetches statistics
- StatsBomb enrichment → Database manager: enriches database