PitchKit

impect

Impect open-data loader: event data for all 306 Bundesliga 2023/24 matches, with lineups, squads and players.

import { fetchMatchEvents, isGoal, shots } from "@pitchkit/data-providers/impect";

const events = await fetchMatchEvents(122838); // Werder Bremen 0-4 Bayern
const goals = shots(events).filter(isGoal);

The same four layers as the other providers: parse* (pure), load* / fetch* (network), narrowing selectors, and composable predicates. Three things to know before you plot anything:

  1. Two coordinate frames. start.coordinates are absolute, and teams swap ends at half time. start.adjCoordinates turn every event so the acting team attacks towards +x; those are the ones lifted to x/y/endX/endY. Plot either with <Pitch type="impect">: metres from the centre spot, y increasing to the left.
  2. The second half's clock starts at 10,000 seconds. Use matchSeconds for a match clock and inMatchOrder to sort.
  3. Set pieces aren't PASS events, and own goals aren't shots. A corner or throw-in is its own action type with a pass object, so use hasPass for every ball played. An own goal is an OWN_GOAL event credited to the team that conceded; score counts it.

Impect's data is not openly licensed. Their terms allow non-commercial analytical and research use, forbid redistributing or altering the data, and ask for Impect to be credited, with their logo, in anything published. This package ships none of it and fetches from Impect's own repository.

See

https://github.com/ImpectAPI/open-data

Interfaces

Type Aliases

Variables

Functions

References

DataProviderError

Re-exports DataProviderError


DataProviderErrorKind

Re-exports DataProviderErrorKind


LoadOptions

Re-exports LoadOptions

On this page