How yukunai/football-predictor works
football-predictor serves match predictions through a CLI, FastAPI, and a single-page web UI. Its domain flow is public/imported match data, normalization and persistence, team-level Dixon–Coles prediction with Elo correction, and quality/calibration evaluation; separate capabilities include World Cup simulation, league coverage, and optional odds processing. The updater’s source dispatch and model/backtest dependencies are supported by excerpts or the source index. The README documents user-facing capabilities, but the large predict.py excerpt is absent, so detailed routing and prediction-call edges are not asserted.
Main entry points: update.py Incremental updater · predict.py CLI, API, UI · dixon_coles.py Dixon-Coles model · database.py Match and prediction store
Components 26
User surfaces
- CLI, API, UI
predict.py - Single-page UI
static/app.js
Data acquisition
- Incremental updater
scrape/update.py - League registry
scrape/registry.py - Public result sources
scrape/football_data.py - API-Football
scrape/api_football.py - football-data.org
scrape/football_data_org.py - FBref xG
scrape/fbref.py - Club Elo
scrape/clubelo.py - National-team Elo
scrape/eloratings.py - CSV importer
data/importers.py
Data foundation
- Team name resolution
data/team_names.py - Entity resolution
data/entity_resolution.py - Match and prediction store
data/database.py - League coverage plan
data/coverage.py
Prediction and evaluation
- Dixon-Coles model
models/dixon_coles.py - Elo prior
models/elo.py - Team form features
features/team_form.py - World Cup simulation
worldcup.py
Quality and analytics
- Backtesting
models/backtest.py - Calibration
models/calibration.py - League model profiles
models/profiles.py - Data quality checks
data/quality.py - Odds cache and rollup
data/odds_rollup.py
Other components
- User
- Public data providers
Connections 31
- User → CLI, API, UI: requests prediction
README.md - CLI, API, UI → Single-page UI: serves UI
README.md - CLI, API, UI → Incremental updater: runs updates
README.md - Incremental updater → League registry: selects leagues
scrape/update.py - Incremental updater → Public result sources: fetches results
scrape/update.py - Incremental updater → API-Football: fetches optionally
scrape/update.py - Incremental updater → football-data.org: fetches optionally
scrape/update.py - Incremental updater → FBref xG: fetches optionally
scrape/update.py - Incremental updater → Club Elo: fetches ratings
scrape/update.py - Incremental updater → National-team Elo: fetches ratings
scrape/update.py - Public data providers → Public result sources: provides results
README.md - Public data providers → API-Football: provides optional data
README.md - Public data providers → football-data.org: provides optional data
README.md - CSV importer → Match and prediction store: imports matches
README.md - Team name resolution → Match and prediction store: canonicalizes teams
data/database.py - Entity resolution → Team name resolution: resolves aliases
data/entity_resolution.py - Incremental updater → Match and prediction store: stores results
scrape/update.py - League coverage plan → League registry: builds provider plans
data/coverage.py - Backtesting → Dixon-Coles model: fits and predicts
models/backtest.py - Backtesting → Elo prior: attaches Elo
models/backtest.py - Calibration → Backtesting: evaluates predictions
models/calibration.py - Dixon-Coles model → Elo prior: uses Elo correction
- Dixon-Coles model → Team form features: uses features
- Data quality checks → Match and prediction store: checks stored data
data/quality.py - World Cup simulation → National-team Elo: uses team ratings
README.md - Odds cache and rollup → Public data providers: ingests market odds
- CLI, API, UI → Dixon-Coles model: produces predictions
predict.py - CLI, API, UI → World Cup simulation: offers simulation
README.md - CLI, API, UI → League coverage plan: exposes coverage
README.md - CLI, API, UI → Data quality checks: runs checks
README.md - League model profiles → Dixon-Coles model: configures model