Multichem commited on
Commit
089f316
·
1 Parent(s): 2ca00f2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -226,7 +226,7 @@ season_data_cols = ['Touches', 'Touch/Min', 'Pts', 'FGM', 'FGA', 'FG%', 'FG3M',
226
  'FG3%', 'FTM', 'FTA', 'FT%', 'OREB Chance', 'OREB', 'DREB Chance', 'DREB', 'REB Chance', 'REB',
227
  'Passes', 'Alt Assists', 'FT Assists', 'Assists', 'Stl', 'Blk', 'Tov', 'PF', 'DD', 'TD', 'Fantasy', 'FD_Fantasy',
228
  'Rebound%', 'Assists/Pass', 'Fantasy/Touch', 'FD Fantasy/Touch']
229
- game_rot_cols = ['PLAYER_NAME', 'MIN', 'PTS', 'FGM', 'FGA', 'FG3M', 'FG3A', 'FTM', 'FTA', 'REB', 'AST', 'STL', 'BLK', 'TOV', 'PF',
230
  'DD', 'TD', 'Fantasy', 'FD_Fantasy']
231
  indv_teams = gamelog_table.drop_duplicates(subset='Team')
232
  total_teams = indv_teams.Team.values.tolist()
@@ -257,7 +257,7 @@ with tab1:
257
  'FG3%', 'FTM', 'FTA', 'FT%', 'OREB Chance', 'OREB', 'DREB Chance', 'DREB', 'REB Chance', 'REB',
258
  'Passes', 'Alt Assists', 'FT Assists', 'Assists', 'Stl', 'Blk', 'Tov', 'PF', 'DD', 'TD', 'Fantasy', 'FD_Fantasy',
259
  'Rebound%', 'Assists/Pass', 'Fantasy/Touch', 'FD Fantasy/Touch']
260
- game_rot_cols = ['PLAYER_NAME', 'MIN', 'PTS', 'FGM', 'FGA', 'FG3M', 'FG3A', 'FTM', 'FTA', 'REB', 'AST', 'STL', 'BLK', 'TOV', 'PF',
261
  'DD', 'TD', 'Fantasy', 'FD_Fantasy']
262
  indv_teams = gamelog_table.drop_duplicates(subset='Team')
263
  total_teams = indv_teams.Team.values.tolist()
@@ -386,7 +386,7 @@ with tab2:
386
  'FG3%', 'FTM', 'FTA', 'FT%', 'OREB Chance', 'OREB', 'DREB Chance', 'DREB', 'REB Chance', 'REB',
387
  'Passes', 'Alt Assists', 'FT Assists', 'Assists', 'Stl', 'Blk', 'Tov', 'PF', 'DD', 'TD', 'Fantasy', 'FD_Fantasy',
388
  'Rebound%', 'Assists/Pass', 'Fantasy/Touch', 'FD Fantasy/Touch']
389
- game_rot_cols = ['PLAYER_NAME', 'MIN', 'PTS', 'FGM', 'FGA', 'FG3M', 'FG3A', 'FTM', 'FTA', 'REB', 'AST', 'STL', 'BLK', 'TOV', 'PF',
390
  'DD', 'TD', 'Fantasy', 'FD_Fantasy']
391
  indv_teams = gamelog_table.drop_duplicates(subset='Team')
392
  total_teams = indv_teams.Team.values.tolist()
@@ -481,7 +481,7 @@ with tab3:
481
  'FG3%', 'FTM', 'FTA', 'FT%', 'OREB Chance', 'OREB', 'DREB Chance', 'DREB', 'REB Chance', 'REB',
482
  'Passes', 'Alt Assists', 'FT Assists', 'Assists', 'Stl', 'Blk', 'Tov', 'PF', 'DD', 'TD', 'Fantasy', 'FD_Fantasy',
483
  'Rebound%', 'Assists/Pass', 'Fantasy/Touch', 'FD Fantasy/Touch']
484
- game_rot_cols = ['PLAYER_NAME', 'MIN', 'PTS', 'FGM', 'FGA', 'FG3M', 'FG3A', 'FTM', 'FTA', 'REB', 'AST', 'STL', 'BLK', 'TOV', 'PF',
485
  'DD', 'TD', 'Fantasy', 'FD_Fantasy']
486
  indv_teams = gamelog_table.drop_duplicates(subset='Team')
487
  total_teams = indv_teams.Team.values.tolist()
@@ -568,7 +568,7 @@ with tab4:
568
  'FG3%', 'FTM', 'FTA', 'FT%', 'OREB Chance', 'OREB', 'DREB Chance', 'DREB', 'REB Chance', 'REB',
569
  'Passes', 'Alt Assists', 'FT Assists', 'Assists', 'Stl', 'Blk', 'Tov', 'PF', 'DD', 'TD', 'Fantasy', 'FD_Fantasy',
570
  'Rebound%', 'Assists/Pass', 'Fantasy/Touch', 'FD Fantasy/Touch']
571
- game_rot_cols = ['PLAYER_NAME', 'MIN', 'PTS', 'FGM', 'FGA', 'FG3M', 'FG3A', 'FTM', 'FTA', 'REB', 'AST', 'STL', 'BLK', 'TOV', 'PF',
572
  'DD', 'TD', 'Fantasy', 'FD_Fantasy']
573
  indv_teams = gamelog_table.drop_duplicates(subset='Team')
574
  total_teams = indv_teams.Team.values.tolist()
@@ -619,7 +619,7 @@ with tab5:
619
  'FG3%', 'FTM', 'FTA', 'FT%', 'OREB Chance', 'OREB', 'DREB Chance', 'DREB', 'REB Chance', 'REB',
620
  'Passes', 'Alt Assists', 'FT Assists', 'Assists', 'Stl', 'Blk', 'Tov', 'PF', 'DD', 'TD', 'Fantasy', 'FD_Fantasy',
621
  'Rebound%', 'Assists/Pass', 'Fantasy/Touch', 'FD Fantasy/Touch']
622
- game_rot_cols = ['PLAYER_NAME', 'MIN', 'PTS', 'FGM', 'FGA', 'FG3M', 'FG3A', 'FTM', 'FTA', 'REB', 'AST', 'STL', 'BLK', 'TOV', 'PF',
623
  'DD', 'TD', 'Fantasy', 'FD_Fantasy']
624
  indv_teams = gamelog_table.drop_duplicates(subset='Team')
625
  total_teams = indv_teams.Team.values.tolist()
@@ -687,6 +687,7 @@ with tab5:
687
  stats_disp = st.container()
688
  check_rotation = team_backlog.sort_values(by='GAME_DATE', ascending=False)
689
  game_rot_stats = check_rotation.reindex(game_rot_cols,axis="columns")
 
690
 
691
  fig = px.timeline(check_rotation, x_start="Start", x_end="Finish", y="Task", range_x=[0,check_rotation["Finish"].max()], text='minutes')
692
  fig.update_yaxes(autorange="reversed")
 
226
  'FG3%', 'FTM', 'FTA', 'FT%', 'OREB Chance', 'OREB', 'DREB Chance', 'DREB', 'REB Chance', 'REB',
227
  'Passes', 'Alt Assists', 'FT Assists', 'Assists', 'Stl', 'Blk', 'Tov', 'PF', 'DD', 'TD', 'Fantasy', 'FD_Fantasy',
228
  'Rebound%', 'Assists/Pass', 'Fantasy/Touch', 'FD Fantasy/Touch']
229
+ game_rot_cols = ['PLAYER_NAME', 'backlog_lookup', 'MIN', 'PTS', 'FGM', 'FGA', 'FG3M', 'FG3A', 'FTM', 'FTA', 'REB', 'AST', 'STL', 'BLK', 'TOV', 'PF',
230
  'DD', 'TD', 'Fantasy', 'FD_Fantasy']
231
  indv_teams = gamelog_table.drop_duplicates(subset='Team')
232
  total_teams = indv_teams.Team.values.tolist()
 
257
  'FG3%', 'FTM', 'FTA', 'FT%', 'OREB Chance', 'OREB', 'DREB Chance', 'DREB', 'REB Chance', 'REB',
258
  'Passes', 'Alt Assists', 'FT Assists', 'Assists', 'Stl', 'Blk', 'Tov', 'PF', 'DD', 'TD', 'Fantasy', 'FD_Fantasy',
259
  'Rebound%', 'Assists/Pass', 'Fantasy/Touch', 'FD Fantasy/Touch']
260
+ game_rot_cols = ['PLAYER_NAME', 'backlog_lookup', 'MIN', 'PTS', 'FGM', 'FGA', 'FG3M', 'FG3A', 'FTM', 'FTA', 'REB', 'AST', 'STL', 'BLK', 'TOV', 'PF',
261
  'DD', 'TD', 'Fantasy', 'FD_Fantasy']
262
  indv_teams = gamelog_table.drop_duplicates(subset='Team')
263
  total_teams = indv_teams.Team.values.tolist()
 
386
  'FG3%', 'FTM', 'FTA', 'FT%', 'OREB Chance', 'OREB', 'DREB Chance', 'DREB', 'REB Chance', 'REB',
387
  'Passes', 'Alt Assists', 'FT Assists', 'Assists', 'Stl', 'Blk', 'Tov', 'PF', 'DD', 'TD', 'Fantasy', 'FD_Fantasy',
388
  'Rebound%', 'Assists/Pass', 'Fantasy/Touch', 'FD Fantasy/Touch']
389
+ game_rot_cols = ['PLAYER_NAME', 'backlog_lookup', 'MIN', 'PTS', 'FGM', 'FGA', 'FG3M', 'FG3A', 'FTM', 'FTA', 'REB', 'AST', 'STL', 'BLK', 'TOV', 'PF',
390
  'DD', 'TD', 'Fantasy', 'FD_Fantasy']
391
  indv_teams = gamelog_table.drop_duplicates(subset='Team')
392
  total_teams = indv_teams.Team.values.tolist()
 
481
  'FG3%', 'FTM', 'FTA', 'FT%', 'OREB Chance', 'OREB', 'DREB Chance', 'DREB', 'REB Chance', 'REB',
482
  'Passes', 'Alt Assists', 'FT Assists', 'Assists', 'Stl', 'Blk', 'Tov', 'PF', 'DD', 'TD', 'Fantasy', 'FD_Fantasy',
483
  'Rebound%', 'Assists/Pass', 'Fantasy/Touch', 'FD Fantasy/Touch']
484
+ game_rot_cols = ['PLAYER_NAME', 'backlog_lookup', 'MIN', 'PTS', 'FGM', 'FGA', 'FG3M', 'FG3A', 'FTM', 'FTA', 'REB', 'AST', 'STL', 'BLK', 'TOV', 'PF',
485
  'DD', 'TD', 'Fantasy', 'FD_Fantasy']
486
  indv_teams = gamelog_table.drop_duplicates(subset='Team')
487
  total_teams = indv_teams.Team.values.tolist()
 
568
  'FG3%', 'FTM', 'FTA', 'FT%', 'OREB Chance', 'OREB', 'DREB Chance', 'DREB', 'REB Chance', 'REB',
569
  'Passes', 'Alt Assists', 'FT Assists', 'Assists', 'Stl', 'Blk', 'Tov', 'PF', 'DD', 'TD', 'Fantasy', 'FD_Fantasy',
570
  'Rebound%', 'Assists/Pass', 'Fantasy/Touch', 'FD Fantasy/Touch']
571
+ game_rot_cols = ['PLAYER_NAME', 'backlog_lookup', 'MIN', 'PTS', 'FGM', 'FGA', 'FG3M', 'FG3A', 'FTM', 'FTA', 'REB', 'AST', 'STL', 'BLK', 'TOV', 'PF',
572
  'DD', 'TD', 'Fantasy', 'FD_Fantasy']
573
  indv_teams = gamelog_table.drop_duplicates(subset='Team')
574
  total_teams = indv_teams.Team.values.tolist()
 
619
  'FG3%', 'FTM', 'FTA', 'FT%', 'OREB Chance', 'OREB', 'DREB Chance', 'DREB', 'REB Chance', 'REB',
620
  'Passes', 'Alt Assists', 'FT Assists', 'Assists', 'Stl', 'Blk', 'Tov', 'PF', 'DD', 'TD', 'Fantasy', 'FD_Fantasy',
621
  'Rebound%', 'Assists/Pass', 'Fantasy/Touch', 'FD Fantasy/Touch']
622
+ game_rot_cols = ['PLAYER_NAME', 'backlog_lookup', 'MIN', 'PTS', 'FGM', 'FGA', 'FG3M', 'FG3A', 'FTM', 'FTA', 'REB', 'AST', 'STL', 'BLK', 'TOV', 'PF',
623
  'DD', 'TD', 'Fantasy', 'FD_Fantasy']
624
  indv_teams = gamelog_table.drop_duplicates(subset='Team')
625
  total_teams = indv_teams.Team.values.tolist()
 
687
  stats_disp = st.container()
688
  check_rotation = team_backlog.sort_values(by='GAME_DATE', ascending=False)
689
  game_rot_stats = check_rotation.reindex(game_rot_cols,axis="columns")
690
+ game_rot_stats = game_rot_stats.drop_duplicates(subset='backlog_lookup')
691
 
692
  fig = px.timeline(check_rotation, x_start="Start", x_end="Finish", y="Task", range_x=[0,check_rotation["Finish"].max()], text='minutes')
693
  fig.update_yaxes(autorange="reversed")