Adapters for the messy data
Normalise provider payloads into typed shots, passes, formations, and match events without rebuilding coordinate and clock handling every time.
Adapters for the messy bits, components for the story.
Campos helps you turn feeds from Opta, StatsBomb, Wyscout, WhoScored, and similar providers into chart-ready football events, then render shot maps, timelines, networks, and pitch views in React.
const shots = fromOpta.shots(events, ctx);
<ShotMap
shots={shots}
/> Most football viz work repeats the same two chores: translating provider data into usable events, and turning those events into product UI. Campos gives you adapters for the first part and React components for the second.
Normalise provider payloads into typed shots, passes, formations, and match events without rebuilding coordinate and clock handling every time.
Render shot maps, timelines, networks, radars, rankings, and pitch views with useful defaults instead of starting from bare plotting primitives.
Compose the pieces into match pages, season summaries, scouting reports, and internal tools that feel like one football product.
Once your data is chart-ready, Campos gives you the React pieces for the common football views: pitch charts, timelines, rankings, profiles, badges, and page primitives.
Half-pitch shot visualisation with xG encoding and presets.
pitchPassing network with nodes, links, and directional flow.
pitchPass trajectories with direction, outcomes, and pitch context.
pitchKickoff lineups and shape views for match pages.
pitchUniform-grid density maps for territory and activity patterns.
pitchSmoothed density surfaces with football-specific pitch framing.
pitchStructured zone-control views for team territory summaries.
pitchMatch xG accumulation over time with goal markers.
timelineMulti-dimensional comparison with size, colour, labels, and guides.
cartesianUnivariate density curves and stacked comparison rows for non-pitch metrics.
cartesianCompact multi-metric profile views for teams and players.
polarRadial percentile profiles for player and team comparisons.
polarLeague-rank progression across a season.
rankingDirectional value-change views over time.
rankingCompact stat strips for scorelines, headers, and summary rails.
uiUse adapters to turn provider-shaped data into Campos-shaped football events with coordinates, teams, clocks, and source context preserved.
Drop those events into chart components with defaults that already understand football layouts, pitch orientation, labels, legends, and empty states.
Add your product logic with callbacks for colour, stroke, shape, opacity, and emphasis while keeping the chart API in normal TypeScript.
@withqwerty/campos-react is the main library package, with
@withqwerty/campos-adapters for provider normalisation,
@withqwerty/campos-schema for canonical types,
@withqwerty/campos-stadia for pitch and goal primitives, and
@withqwerty/campos-static for Node-side export.
The intended path is provider payloads into adapter products such as
ShotEvent[] and PassEvent[], then straight into
chart components. Aggregated charts can still take plain metric rows when
there is no provider feed involved.
Style props accept constants, maps, or callbacks. The callback gets the point model and returns the style, so most editorial logic stays in normal TypeScript rather than a chart-specific DSL.
Compute helpers are still exported from @withqwerty/campos-react
during the pre-1.0 line. That keeps the public surface smaller while the chart
and model contracts are still being battle-tested.
Static export is a deliberate two-step surface: build an
ExportFrameSpec in React, then render it to SVG or PNG in Node with
@withqwerty/campos-static.
The next pass keeps pushing both sides of Campos: better data preparation for real football feeds, and more complete React surfaces built from those events.
pnpm add @withqwerty/campos-react@beta
The current docs site tracks the beta release channel, so
installs should pin @beta until Campos moves onto
the default npm tag.