Skip to content

Frame

kloppy.domain.Frame dataclass

Frame(
    period,
    timestamp,
    statistics,
    ball_owning_team,
    ball_state,
    frame_id,
    players_data,
    other_data,
    ball_coordinates,
    ball_speed=None,
)

Bases: DataRecord

Tracking data frame.

ATTRIBUTE DESCRIPTION
frame_id

The unique identifier of the frame. Aias for record_id.

TYPE: int

ball_coordinates

The coordinates of the ball

TYPE: Point3D

players_data

A dictionary containing the tracking data for each player.

TYPE: Dict[Player, PlayerData]

ball_speed

The speed of the ball

TYPE: Optional[float]

other_data

A dictionary containing additional data

TYPE: Dict[str, Any]

frame_id instance-attribute

frame_id

players_data instance-attribute

players_data

other_data instance-attribute

other_data

ball_coordinates instance-attribute

ball_coordinates

ball_speed class-attribute instance-attribute

ball_speed = None

record_id property

record_id

players_coordinates property

players_coordinates

dataset class-attribute instance-attribute

dataset = field(init=False)

prev_record class-attribute instance-attribute

prev_record = field(init=False)

next_record class-attribute instance-attribute

next_record = field(init=False)

period instance-attribute

period

timestamp instance-attribute

timestamp

statistics instance-attribute

statistics

ball_owning_team instance-attribute

ball_owning_team

ball_state instance-attribute

ball_state

time property

time

attacking_direction property

attacking_direction

set_refs

set_refs(dataset, prev, next_)

matches

matches(filter_)

prev

prev(filter_=None)

next

next(filter_=None)

replace

replace(**changes)