-
Notifications
You must be signed in to change notification settings - Fork 82
Open
Description
The current MinutesPlayedAggregator (see here) calculates a general MinutesPlayed and optionally also a MinutesPlayedPerPosition. I think it would make sense to extend this to also calculate MinutesPlayerPerPossessionState, which would provide minutes played for three possession states:
- in possession
- out of possession
- ball dead
The existing ball_state and ball_owning_team properties can be used to extract the necessary information.
Example data structure:
class PossessionState(Enum):
IN_POSSESSION = 'in-possession'
OUT_OF_POSSESSION = 'out-of-possession'
BALL_DEAD = 'ball-dead'
class MinutesPlayedPerPossessionState(NamedTuple):
player: Player
possession_state: PossessionState
duration: timedeltaMetadata
Metadata
Assignees
Labels
No labels