Metric cards: one name, many definitions

football-docs 0.17.0 adds metric cards. Each card lists every published version of a football metric, with its source, a checked quote and, where possible, test code you can run.

football-docs

Football metrics share names, not definitions. PPDA, xA and progressive passes each have several published versions. Every data provider, website and paper uses its own, and most charts and articles never say which one they used.

Here is how big the gap is. Take the 2022 World Cup final and apply each published rule to the same StatsBomb open data. The events are identical, so every difference below comes from the definition alone.

Argentina, 2022 World Cup finalValue
PPDA, StatsBomb (Hudl) formula7.42
PPDA, Colin Trainor’s 2014 formula9.77
PPDA, Opta Analyst’s formula6.81
Progressive passes, Wyscout’s rule97
Progressive passes, FBref’s rule64
Progressive passes, Opta Analyst’s rule36
Progressive passes, American Soccer Analysis’s rule33

So when someone writes “Argentina’s PPDA was 7.4”, you can’t check it, and you can’t compare it with a number from another site.

This gets worse with AI agents. Ask one what PPDA is and you get one confident definition with no source. Often it’s a blend of two versions, and the agent can’t tell you that.

What a metric card is

A metric card is one checked page per metric, inside football-docs. Each card has:

The first eleven cards are xG, npxG, xG assisted (FBref’s xAG), xA (the pass-level kind), PPDA, progressive passes, progressive carries, xT, VAEP, field tilt and pass completion.

Your agent gets two new tools:

get_metric("ppda")               -> the whole card
get_metric("ppda.trainor-2014")  -> one version
list_metrics                     -> every card and version

The cards also come up in ordinary search_docs results, and card fixes reach your install with the daily docs update, with no new version needed.

What you can do with it

  1. Cite a number exactly. Write “PPDA 7.42 (ppda.statsbomb-hudl)” and anyone can find the definition behind it.
  2. Explain why two sites disagree. If one site says 64 progressive passes and another says 36, the card shows which rule each one uses and where they differ. In that case: FBref counts a completed pass that moves the ball at least 10 yards towards goal (measured from its furthest point in the last six passes) or into the penalty area, unless it starts in the defending 40% of the pitch. Opta Analyst counts a completed open-play pass in the attacking two-thirds that moves the ball at least 25% closer to goal.
  3. Check your own code. Write PPDA for StatsBomb data, run it on the final, and compare with 7.4222. If you get something else, the card tells you which counting rule to look at.
  4. Change data provider without surprises. Moving from Opta to StatsBomb? The cards show which metrics change meaning between the two, from penalties in xG to which passes count.
  5. Keep your AI agent honest. This is the main reason the cards exist. An agent (nutmeg, for example) looks the metric up by ID instead of making a definition up, and puts that ID next to every claim it makes. If it says “xA”, the cards make it say which of the two xA metrics it means.

Why not just use…

What the cards add is the comparison in one place, with every claim tied to a checked source.

What it doesn’t do

Try it

claude mcp add football-docs -- npx -y football-docs@latest

Then ask your agent something like “which PPDA does Hudl use, and how is it different from Trainor’s?”

Is there a metric you’d like a card for, or a definition I’ve got wrong? I’m taking requests for the next batch.