Skip to content

Code

kloppy.domain.Code dataclass

Code(
    period,
    timestamp,
    statistics,
    ball_owning_team,
    ball_state,
    code_id,
    code,
    end_timestamp,
    labels=dict(),
)

Bases: DataRecord

Single code

ATTRIBUTE DESCRIPTION
code_id

Unique identifier provided by the coding software. Aias for record_id.

TYPE: str

code

A string describing the code.

TYPE: str

end_timestamp

End timestamp for the period of time this code instance is active.

TYPE: timedelta

labels

Text labels describing this code instance.

TYPE: Dict[str, Union[bool, str]]

code_id instance-attribute

code_id

code instance-attribute

code

end_timestamp instance-attribute

end_timestamp

labels class-attribute instance-attribute

labels = field(default_factory=dict)

record_id property

record_id

start_timestamp property

start_timestamp

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)