Spaces:
Runtime error
Runtime error
James McCool
commited on
Commit
·
57d8770
1
Parent(s):
2ac2812
Update game rotation timeline visualization with player-specific resources and delta data
Browse files
app.py
CHANGED
@@ -695,11 +695,11 @@ with tab5:
|
|
695 |
game_rot_stats = check_rotation.reindex(game_rot_cols,axis="columns")
|
696 |
game_rot_stats = game_rot_stats.drop_duplicates(subset='backlog_lookup')
|
697 |
|
698 |
-
fig = px.timeline(check_rotation, x_start="Start", x_end="Finish",
|
699 |
fig.update_yaxes(autorange="reversed")
|
700 |
|
701 |
fig.layout.xaxis.type = 'linear'
|
702 |
-
|
703 |
# Create a color map for each unique player
|
704 |
player_colors = px.colors.qualitative.Plotly[:len(check_rotation['PLAYER_NAME'].unique())]
|
705 |
color_map = dict(zip(check_rotation['PLAYER_NAME'].unique(), player_colors))
|
|
|
695 |
game_rot_stats = check_rotation.reindex(game_rot_cols,axis="columns")
|
696 |
game_rot_stats = game_rot_stats.drop_duplicates(subset='backlog_lookup')
|
697 |
|
698 |
+
fig = px.timeline(check_rotation, x_start="Start", x_end="Finish", resource="PLAYER_NAME", range_x=[0,check_rotation["Finish"].max()], text='minutes')
|
699 |
fig.update_yaxes(autorange="reversed")
|
700 |
|
701 |
fig.layout.xaxis.type = 'linear'
|
702 |
+
fig.data[0].y = check_rotation.delta.tolist()
|
703 |
# Create a color map for each unique player
|
704 |
player_colors = px.colors.qualitative.Plotly[:len(check_rotation['PLAYER_NAME'].unique())]
|
705 |
color_map = dict(zip(check_rotation['PLAYER_NAME'].unique(), player_colors))
|