Spaces:
Build error
Build error
James McCool
commited on
Commit
·
88e5eb6
1
Parent(s):
aac38b6
Update game rotation timeline plot to use delta column for x-axis data
Browse files
app.py
CHANGED
|
@@ -732,17 +732,17 @@ with tab5:
|
|
| 732 |
stats_disp = st.container()
|
| 733 |
check_rotation = working_data[working_data['backlog_lookup'] == game_id_var]
|
| 734 |
check_rotation = check_rotation.sort_values(by='Start', ascending=True)
|
| 735 |
-
check_rotation['Task'] = check_rotation['Task'] + ' ' + check_rotation['Start'].astype(str)
|
| 736 |
game_rot_stats = check_rotation.reindex(game_rot_cols,axis="columns")
|
| 737 |
game_rot_stats = game_rot_stats.drop_duplicates(subset='PLAYER_NAME')
|
| 738 |
|
| 739 |
fig = px.timeline(check_rotation, x_start="Start", x_end="Finish", y="Task", range_x=[0,check_rotation["Finish"].max()], text='minutes')
|
| 740 |
|
| 741 |
fig.layout.xaxis.type = 'linear'
|
| 742 |
-
fig.data[0].x = check_rotation.
|
| 743 |
fig.data[0].y = check_rotation.Task.tolist()
|
| 744 |
fig.update_yaxes(autorange="reversed")
|
| 745 |
-
|
| 746 |
fig.add_vline(x=12, line_width=3, line_dash="dash", line_color="green")
|
| 747 |
fig.add_vline(x=24, line_width=3, line_dash="dash", line_color="green")
|
| 748 |
fig.add_vline(x=36, line_width=3, line_dash="dash", line_color="green")
|
|
|
|
| 732 |
stats_disp = st.container()
|
| 733 |
check_rotation = working_data[working_data['backlog_lookup'] == game_id_var]
|
| 734 |
check_rotation = check_rotation.sort_values(by='Start', ascending=True)
|
| 735 |
+
# check_rotation['Task'] = check_rotation['Task'] + ' ' + check_rotation['Start'].astype(str)
|
| 736 |
game_rot_stats = check_rotation.reindex(game_rot_cols,axis="columns")
|
| 737 |
game_rot_stats = game_rot_stats.drop_duplicates(subset='PLAYER_NAME')
|
| 738 |
|
| 739 |
fig = px.timeline(check_rotation, x_start="Start", x_end="Finish", y="Task", range_x=[0,check_rotation["Finish"].max()], text='minutes')
|
| 740 |
|
| 741 |
fig.layout.xaxis.type = 'linear'
|
| 742 |
+
fig.data[0].x = check_rotation.delta.tolist()
|
| 743 |
fig.data[0].y = check_rotation.Task.tolist()
|
| 744 |
fig.update_yaxes(autorange="reversed")
|
| 745 |
+
|
| 746 |
fig.add_vline(x=12, line_width=3, line_dash="dash", line_color="green")
|
| 747 |
fig.add_vline(x=24, line_width=3, line_dash="dash", line_color="green")
|
| 748 |
fig.add_vline(x=36, line_width=3, line_dash="dash", line_color="green")
|