What an adapter actually does.
The adapter absorbs each provider's quirks so your chart code never sees them. One call returns a typed array. That's the whole interface.
import { fromOpta } from "@withqwerty/campos-adapters";
import { ShotMap } from "@withqwerty/campos-react";
const shots = fromOpta.shots(rawEvents, matchContext);
// → ShotEvent[] with canonical coords,
// outcomes, xG, body part, situation.
<ShotMap shots={shots} /> - Direction handled — the attacker is always shooting rightward
-
Outcomes mapped to one vocabulary (
goal,saved,off-target,blocked,hit-woodwork) - Own-goals and penalty shootouts filtered out of shot products
- Player labels resolved where the provider's event stream doesn't carry them
- Missing fields and edge cases handled consistently, so your chart never blows up on sparse data
- Not a scraper — you still need to get raw data somewhere
- Not an analysis layer — no xG models, no xT, no PPDA
- Not a dataset unifier — packets are shaped for Campos charts, not for a unified multi-provider event lake