Commit Graph

3 Commits

Author SHA1 Message Date
ramseshk 6c1fb46e8a Fix auction: realistic valuations, multi-strategy comparison, role chips rendering
- Realistic price model: scales by FVM (Lautaro FVM=370 → ~199 cr, QI×5.7)
  Formula: qi * max(1.2, fvm/65) with forward premium and small-sample penalty
- 5 strategy engines: Balanced, Value, Stars, Safe, MILP-Lite
  Each with different score functions (value ratio, stability, risk adj)
- Strategy comparison radar grid: total FV, efficiency, stars, avg games, budget%
- Squad table with color-coded price bands (gold >100cr, sky >50cr, green <50cr)
- Market distribution histogram by role
- Top value picks section with cr/FV efficiency
- Fixed role_chip HTML rendering in all pages (unsafe_allow_html=True)
- Verified: 0 errors, 31 role chips, 5 KPIs, 8 charts
2026-08-11 16:13:38 +08:00
ramseshk 397078d635 Fix dashboard imports for Streamlit multi-page routing
- Add sys.path.insert at top of app.py and all 5 page files
- Fix .streamlit/config.toml CORS/XSRF conflict
- Remove duplicate st.set_page_config from page files
- Verified: all pages import cleanly, dashboard boots via streamlit run
- All 49 tests passing (31 original + 18 dashboard)
2026-08-11 15:08:09 +08:00
ramseshk 65f5b66b05 Dashboard: Stadium Night design system, 5-page Streamlit app, warehouse exporter
- src/export/warehouse.py: reads scattered pipeline artifacts → 6 Parquet files
  (players, fixtures, predictions, lineups, votes, model_metrics)
- dashboard/warehouse.py: read-only cached Parquet loader
- .streamlit/config.toml: dark theme base, server config
- dashboard/viz/template.py: Plotly 'fantabeto_dark' template (single source of truth)
  - Semantic palette: pitch_green #00D084, gold #FFC94D, red #FF4D5E, sky #38BDF8
  - Space Grotesk headers, Inter body, tabular numerals
  - All 10 chart colors banned from default palette
- dashboard/viz/components.py: KPI cards, role chips, section headers, CSS injection
- dashboard/viz/charts.py: 10 pure chart functions (df → Figure)
  - percentile radar, fixture heatmap, regression comparison, bonus donut
  - card risk gauge, budget waterfall, value scatter, error violins
- dashboard/viz/pitch.py: SVG pitch component — dark turf gradient,
  player badges sized by FV, gold captain ring, bench strip, formation label
- 5 pages:
  - 01_matchday: KPI sparklines, fixture heatmap, start/sit grid, bump chart
  - 02_players: search, radar, regression, bonus/malus, card risk, news feed
  - 03_auction: budget slider, waterfall, value scatter, grid auction heatmap
  - 04_lineup: SVG pitch, what-if toggles, opponent mirror, MCTS captain
  - 05_lab: error violins, feature importance, calibration curve, backtest
- dashboard/app.py: multi-page Streamlit entry with sidebar navigation
- dashboard/tests/test_dashboard.py: 18 unit tests (warehouse, template, charts, pitch)
- DASHBOARD.md: full architecture docs, design system reference
- 49 total tests passing (31 existing + 18 dashboard)
2026-08-11 14:53:51 +08:00