Inspiration

In high-stakes tournaments like the 2026 World Cup, matches often swing in short chaotic windows where teams suddenly concede. Coaches and analysts rarely have a single, unified view that shows when a collapse risk is rising, which players or patterns are driving it, and what tactical adjustments could reduce that risk in real time. We saw a gap between rich event data and practical, decision-ready insights. CollapseOS was built to bridge that gap-turning granular match data into actionable intelligence that helps coaches balance tactics, player load, and momentum before a collapse happens.

What it does

  • It visualizes collapse risk over time.
  • Predicts near-term concession risk using a lightweight ML model.
  • Flags risks spikes with change-points detection (CUMSUM logic)
  • Provides tactical summaries such as possession, pass completion, and key passes.
  • Generates AI-assisted coaching recommendation in Coach mode.
  • Integrates 2026 World Cup context.

How we built it

For backend we used:

  • FastAPI for API layer
  • DuckDB + Pandas for fast analytical queries and precomputed features
  • scikit-learn for near-term collapse prediction
  • CUSUM-style detection to identify risk jumps
  • NetworkX to construct pass networks from StatsBomb event data
  • A reusable coach_tactics normalization layer to standardize StatsBomb JSON into consistent metrics

Frontend:

  • React, CSS for UI
  • Interactive pass networks Recharts / Plotly for time-series risk visualization
  • Gemini integration for AI-driven coach recommendations

Challenges we ran into

  • Schema alignment: StatsBomb’s event structure is powerful but complex. Mapping passes, formations, and outcomes into both DB and UI consistently required several iterations.
  • Fallback logic: Supporting both real and synthetic data without branching the entire codebase was non-trivial.
  • UX cohesion: Combining ML risk scores, tactical summaries, counterfactual simulations, and AI suggestions into one coherent workflow required careful layout and prioritization to avoid overwhelming users.

Accomplishments that we're proud of

  • A single, unified coaching dashboard that connects predictive risk, tactical context, and player impact.
  • Real integration with StatsBomb event data while remaining fully demo-ready with synthetic data.
  • A reusable tactical normalization layer that powers both analytics and UI consistently.

What we learned

  • Normalizing event data once and reusing it across the API and frontend dramatically improves maintainability.
  • DuckDB + Pandas is surprisingly powerful for hackathon-scale analytics.
  • A single stable “coach view” API endpoint simplifies frontend logic and increases reliability.
  • Predictive models are most useful when embedded directly into a decision workflow—not shown as isolated metrics.

What's next for CollapseOS

  • Improve the collapse-risk model with richer features and labeled training data.
  • Expand to additional competitions and leagues.
  • Deepen tactical metrics (pressure events, progressive passes, shot creation chains).
  • Deploy publicly to make it usable without local setup.

Built With

Share this project:

Updates