Punditry often fails because it relies on impression rather than data. A recent 3-1 football result looked like a dominant win, but event data revealed the losing team actually generated better chances until a red card shifted the momentum. MatchLens, a new open-source tool built for the Microsoft x Premier League "Inside the Game" hackathon, aims to close this gap by converting raw CSV event logs into tactical reports with evidence citations for every insight.

How MatchLens Works

The tool ingests match events including minute, team, type, player, and expected goals (xG) alongside team information. It outputs a natural-language report that includes xG comparisons, key moment timelines, and six specific insight types such as CLINICAL_FINISHING, WASTEFUL_ATTACK, and MAN_DOWN_EFFECT. Crucially, every insight carries evidence citations pointing to the specific event rows and numbers used, eliminating vague narrative hand-waving.

Offline and Dependency-Free

MatchLens runs entirely on the local machine using pure Python standard library modules like csv, datetime, and argparse. This architecture ensures that licensed professional data or sensitive grassroots spreadsheets never leave the user's device, addressing privacy concerns for coaches and analysts who cannot upload data to third-party services. The tool is deterministic, meaning every number in the report is traceable back to the source data.

Rigorous Testing and Real-World Bugs

The project ships with a 19-assertion eval suite that validates core logic, such as ensuring stoppage-time minutes are correctly binned and that red cards properly split the match timeline. During development, this suite caught three significant bugs, including an issue where the away team's scoreline wasn't initialized, causing the first away goal to render incorrectly. These tests proved more reliable than manual code review for catching logic errors that could skew analytical outputs.

Key Takeaways

  • MatchLens provides six distinct insight types, including MOMENTUM_PHASE and SUB_IMPACT, to analyze tactical performance beyond the final score.
  • The tool is built with zero external dependencies, using only Python standard library modules for maximum portability and privacy.
  • A comprehensive eval suite with 19 assertions ensures data integrity, having already identified and fixed critical rendering and binning errors.
  • Every analytical claim in the generated report is backed by specific evidence citations from the input CSV data.

The Bottom Line

MatchLens proves that you don't need a cloud subscription to get serious tactical insights; a local script with rigorous testing is enough to turn subjective punditry into objective, citable truth.