This function, create_time_graph_data, constructs a dataset suitable for time-series visualization, such as a line graph, that depicts the performance of various metrics over defined time intervals. This is particularly useful for analysing how specific actions or metrics evolve during an event or over time.
row_names (list of strings): Specifies the categories to be included in the graph (e.g., "Duel", "Ball Recovery").
start_clip (string): Identifies the event that marks the beginning of the timeframe for data aggregation.
aggregate_type (string): Determines the method of aggregation, either 'count_clips' for counting occurrences or 'duration' for summing durations.
timeframe_s (integer): Defines the length of each time segment in seconds.
Basic format: ["create_time_graph_data", [row_names], "start_clip", "aggregate_type", timeframe_s]
In the following example, we want to collate the data of summed durations for Duels, Ball Recoveries and Fouls Won clips every 5 mins (300s) since the first Kick Off clip:
e.g: ["create_time_graph_data", ["Duel", "Ball Recovery", "Foul Won"], "Kick Off", "duration", 300]