Stats Perform adapter

Stats Perform: The modern Stats Perform API envelope (same data as Opta).

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.

Input shape
MA1 document for lineups, MA3 document for events — both typed.
Status
Reference-backed (partial)
Raw feed
Stats Perform
Provider-shaped. Their coordinates, their qualifier codes, their outcome strings.
Messy
Campos adapter
fromStatsPerform.shots(ma3Document)
Flips direction, standardises outcomes, filters own-goals and shootouts, resolves player labels.
One call
Typed data
ShotEvent[]
Drop into <ShotMap />, your own React view, a server-side report, or an analysis script.
Ready
Stats Perform vs Opta — same company, different envelope

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".

Get it running

One import, one call per surface.

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");
What this adapter ships

The calls you can make today.

Partial
events() returns Event[]

Every recognised match event in a canonical shape.

Partial
shots() returns ShotEvent[]

Just the shots, ready to plot.

Partial
passes() returns PassEvent[]

Pass trajectories with start, end, and result.

Partial
matchLineups() returns MatchLineups

Home and away team sheets with starters and bench.

Partial
formations() returns FormationTeamData

Kickoff tactical shape for one side.

Shipped
matchContext() returns MatchContext

Attack direction and period metadata.

What you can build with this

Charts that drop straight onto this adapter's output.

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.

Pitch charts

Plot events, shots, passes, and formations directly on the pitch.

Match-time + xG

Time-series and xG-driven views from shots().

Bring your own aggregates

These charts are adapter-independent — they take pre-aggregated inputs.

Two documents, two roles

MA1 for lineups, MA3 for events.

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.

Current scope

What's honest about this adapter today.

Why it's listed as partial

Sample-backed, not fully exercised.

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.

What's available today

Full canonical product set.

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.

Access

Licensed feed, not scraped.

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.

Lineage

What this adapter borrows from whom.

Concrete credits for the projects that did the underlying research or laid the reference tables we read from.

kloppy Python

Provider type-ID → canonical kind mapping, coordinate transformers, and direction-by-period normalisation patterns. Our reference for Opta, StatsBomb, Wyscout, Stats Perform, and Sportec.

Compare providers