events()
returns Event[] Every recognised match event in a canonical shape.
Stats Perform is the company Opta became after the 2019 Perform Group / Stats LLC merger, so "Opta data" and "Stats Perform data" are the same event model — the difference is only how you receive it. The modern API delivers MA1 JSON for lineups and MA3 JSON for events; under the hood this adapter unwraps those envelopes and passes the events through the Opta pipeline. Use this adapter when you're on the current API; use the Opta adapter above when you have legacy F24-shaped event arrays. Sample-backed today — widen as more of the feed family is exercised against real data.
fromStatsPerform.shots(ma3Document) ShotEvent[] <ShotMap />, your own React view, a server-side
report, or an analysis script.
Stats Perform is what Opta became after the 2019 Perform Group / Stats LLC merger.
The event data is identical; what differs is how you receive it. This adapter is for
the modern MA1/MA3 JSON API. Use Opta if you have classic
F24-shaped event arrays instead. Under the hood, this adapter unwraps MA3 documents and
passes events through fromOpta, then rebrands the output as provider: "statsperform".
import { fromStatsPerform } from "@withqwerty/campos-adapters";
const events = fromStatsPerform.events(ma3Document);
const shots = fromStatsPerform.shots(ma3Document);
const passes = fromStatsPerform.passes(ma3Document);
const lineups = fromStatsPerform.matchLineups(ma1Document);
const formation = fromStatsPerform.formations(ma1Document, "home"); events()
returns Event[] Every recognised match event in a canonical shape.
shots()
returns ShotEvent[] Just the shots, ready to plot.
passes()
returns PassEvent[] Pass trajectories with start, end, and result.
matchLineups()
returns MatchLineups Home and away team sheets with starters and bench.
formations()
returns FormationTeamData Kickoff tactical shape for one side.
matchContext()
returns MatchContext Attack direction and period metadata.
Supported cards plot from this adapter with no extra work. Partial cards plot, but read the scope note. Dimmed cards need a surface this provider doesn't ship.
Plot events, shots, passes, and formations directly on the pitch.
Time-series and xG-driven views from shots().
These charts are adapter-independent — they take pre-aggregated inputs.
fromStatsPerform.matchLineups(ma1Document) reads the MA1 lineup feed for
starters, bench, formation, and substitution metadata. fromStatsPerform.events(ma3Document),
shots(...), passes(...), and matchContext(...)
all read the MA3 event feed. The two documents are kept separate because that's how the
feed family is actually structured.
The adapter ships against representative MA1/MA3 documents. Stats Perform's feed family is large, and we widen the surface as real feeds surface new edge cases — every widening is a credited change in the matrix.
Events, shots, passes, match context, lineups, and formations all ship. What varies by deployment is how complete the MA1/MA3 documents you hand in are — more complete feeds give richer outputs.
Stats Perform is a commercial provider. The adapter is useful for teams, clubs, agencies, and media organisations that already have access — it doesn't help you acquire the data.
Concrete credits for the projects that did the underlying research or laid the reference tables we read from.
Provider type-ID → canonical kind mapping, coordinate transformers, and direction-by-period normalisation patterns. Our reference for Opta, StatsBomb, Wyscout, Stats Perform, and Sportec.