Sportec adapter

Sportec: Open DFL Bundesliga XML feed.

Sportec's open DFL feed is XML — the adapter ships both the parser (parseMeta, parseEvents) and the full canonical pipeline on top. Events route through the Opta family under the hood and get rebranded with Sportec's original event IDs so nothing leaks.

Input shape
DFL XML strings, or pre-parsed SportecMeta + SportecEvent[] arrays.
Status
Reference-backed (partial)
Raw feed
Sportec
Provider-shaped. Their coordinates, their qualifier codes, their outcome strings.
Messy
Campos adapter
fromSportec.shots(metaXml, eventsXml)
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
Open DFL feed, parser included

Sportec publishes an open DFL feed for the Bundesliga as XML. The adapter ships both the XML parser (parseMeta, parseEvents) and the canonical pipeline on top — you can hand in raw XML strings or pre-parsed objects.

Get it running

One import, one call per surface.

import { fromSportec } from "@withqwerty/campos-adapters";

const meta = fromSportec.parseMeta(metaXml);
const events = fromSportec.parseEvents(eventXml);
const normalisedEvents = fromSportec.events(meta, events);
const shots = fromSportec.shots(meta, events);
const passes = fromSportec.passes(meta, events);
const lineups = fromSportec.matchLineups(meta);
What this adapter ships

The calls you can make today.

Partial
events() returns Event[]

Every recognised match event in a canonical shape.

Sportec notes: Passes, shots, fouls, cards, subs, ball-claiming recoveries. Tackles deferred.

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 inputs, either way

Accept XML strings or pre-parsed data.

If you're reading XML from disk or a feed subscription, hand the strings straight to fromSportec.shots(metaXml, eventXml). If you're working from a preprocessing step that already produced SportecMeta and SportecEvent[] arrays, those pass through unchanged. The parser functions are exposed for pipelines that need them standalone.

Current scope

What's honest about this adapter today.

Why it's listed as partial

Real event subset, tackling deferred.

The current adapter ships a real event subset: passes, shots, fouls, cards, substitutions, and ball-claiming recoveries. Tackling taxonomy and several other-ball-action categories remain intentionally deferred until the canonical event vocabulary is ready to represent them faithfully.

Under the hood

Rebranded Opta pipeline.

Sportec's DFL event model overlaps substantially with Opta's. The adapter translates Sportec events into the Opta event shape, runs them through fromOpta, and rebrands outputs with provider: "sportec" and the original Sportec event IDs — no Opta IDs leak into your data.

Where the XML comes from

DFL open-data release or a licensed feed.

The DFL publishes Sportec XML for select matches as open data. Teams and broadcasters with licences receive the full feed. The adapter treats both the same — it reads the XML shape, not the access level.

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