What's a GameDataset?
A GameDataset is a class that serves 2 purposes:
- Hold CodeballFrames for tracking, event, and other data types
- Provide methods to enrich those CodeballFrames
- Provide auxiliary methods to process and handle data that require information from the game_dataset (e.g. frame rate)
- tracking: contains a
- events: contains an
- game_dataset_type: return an Enum with the type of the dataset, which could be [ONLY_TRACKING, ONLY_EVENTS, FULL_SAME_PROVIDER, FULL_MIXED_PROVIDERS]
- metadata: the metadata of the dataset (unless it's a FULL_MIXED_PROVIDERS type) that comes from loading the data with kloppy.
There is a main method _enrich_data that runs all the below:
- find_interval: given a Series of bool values computes the intervals of True values.
- frame_to_milliseconds: given a frame number it returns the value in milliseconds of that moment in the video.