James McCool commited on
Commit
5a2d2d4
·
1 Parent(s): edd8da4

need to run the initial baselines

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +20 -21
src/streamlit_app.py CHANGED
@@ -278,27 +278,26 @@ def split_frame(input_df, rows):
278
  def convert_df_to_csv(df):
279
  return df.to_csv().encode('utf-8')
280
 
281
- # gamelog_table, game_rot, timestamp = init_baselines('all')
282
- # t_stamp = f"Updated through: " + str(timestamp) + f" CST"
283
- # basic_cols = ['Player', 'Pos', 'Team', 'Opp', 'Season', 'Date', 'Matchup', 'Min']
284
- # basic_season_cols = ['Pos', 'Team', 'Min']
285
- # data_cols = ['team_score', 'opp_score', 'spread', 'Touches', 'Pts', 'FGM', 'FGA', 'FG%', 'FG3M',
286
- # 'FG3A', 'FG3%', 'FTM', 'FTA', 'FT%', 'OREB Chance', 'OREB', 'DREB Chance', 'DREB', 'REB Chance', 'REB',
287
- # 'Passes', 'Alt Assists', 'FT Assists', 'Assists', 'Stl', 'Blk', 'Tov', 'PF', 'DD', 'TD', 'Fantasy', 'FD_Fantasy',
288
- # 'FPPM', 'Rebound%', 'Assists/Pass', 'Touch_per_min', 'Fantasy/Touch', 'FD Fantasy/Touch']
289
- # season_data_cols = ['Touches', 'Touch/Min', 'Pts', 'FGM', 'FGA', 'FG%', 'FG3M', 'FG3A',
290
- # 'FG3%', 'FTM', 'FTA', 'FT%', 'OREB Chance', 'OREB', 'DREB Chance', 'DREB', 'REB Chance', 'REB',
291
- # 'Passes', 'Alt Assists', 'FT Assists', 'Assists', 'Stl', 'Blk', 'Tov', 'PF', 'DD', 'TD', 'Fantasy', 'FD_Fantasy',
292
- # 'FPPM', 'Rebound%', 'Assists/Pass', 'Fantasy/Touch', 'FD Fantasy/Touch']
293
- # game_rot_cols = ['PLAYER_NAME', 'backlog_lookup', 'spread', 'MIN', 'PTS', 'FGM', 'FGA', 'FG3M', 'FG3A', 'FTM', 'FTA', 'REB', 'AST', 'STL', 'BLK', 'TOV', 'PF',
294
- # 'Fantasy', 'FD_Fantasy']
295
- # indv_teams = gamelog_table.drop_duplicates(subset='Team')
296
- # total_teams = indv_teams.Team.values.tolist()
297
- # indv_game_rot_teams = game_rot.drop_duplicates(subset='TEAM_ABBREVIATION')
298
- # total_game_rot_teams = indv_game_rot_teams.TEAM_ABBREVIATION.values.tolist()
299
- # indv_players = gamelog_table.drop_duplicates(subset='Player')
300
- # total_players = indv_players.Player.values.tolist()
301
- # total_dates = gamelog_table.Date.values.tolist()
302
 
303
  # tab1, tab2, tab3, tab4, tab5 = st.tabs(['Gamelogs', 'Correlation Matrix', 'Position vs. Opp', 'Positional Percentages', 'Game Rotations'])
304
 
 
278
  def convert_df_to_csv(df):
279
  return df.to_csv().encode('utf-8')
280
 
281
+ gamelog_table, game_rot, timestamp = init_baselines('gamelogs')
282
+ basic_cols = ['Player', 'Pos', 'Team', 'Opp', 'Season', 'Date', 'Matchup', 'Min']
283
+ basic_season_cols = ['Pos', 'Team', 'Min']
284
+ data_cols = ['team_score', 'opp_score', 'spread', 'Touches', 'Pts', 'FGM', 'FGA', 'FG%', 'FG3M',
285
+ 'FG3A', 'FG3%', 'FTM', 'FTA', 'FT%', 'OREB Chance', 'OREB', 'DREB Chance', 'DREB', 'REB Chance', 'REB',
286
+ 'Passes', 'Alt Assists', 'FT Assists', 'Assists', 'Stl', 'Blk', 'Tov', 'PF', 'DD', 'TD', 'Fantasy', 'FD_Fantasy',
287
+ 'FPPM', 'Rebound%', 'Assists/Pass', 'Touch_per_min', 'Fantasy/Touch', 'FD Fantasy/Touch']
288
+ season_data_cols = ['Touches', 'Touch/Min', 'Pts', 'FGM', 'FGA', 'FG%', 'FG3M', 'FG3A',
289
+ 'FG3%', 'FTM', 'FTA', 'FT%', 'OREB Chance', 'OREB', 'DREB Chance', 'DREB', 'REB Chance', 'REB',
290
+ 'Passes', 'Alt Assists', 'FT Assists', 'Assists', 'Stl', 'Blk', 'Tov', 'PF', 'DD', 'TD', 'Fantasy', 'FD_Fantasy',
291
+ 'FPPM', 'Rebound%', 'Assists/Pass', 'Fantasy/Touch', 'FD Fantasy/Touch']
292
+ game_rot_cols = ['PLAYER_NAME', 'backlog_lookup', 'spread', 'MIN', 'PTS', 'FGM', 'FGA', 'FG3M', 'FG3A', 'FTM', 'FTA', 'REB', 'AST', 'STL', 'BLK', 'TOV', 'PF',
293
+ 'Fantasy', 'FD_Fantasy']
294
+ indv_teams = gamelog_table.drop_duplicates(subset='Team')
295
+ total_teams = indv_teams.Team.values.tolist()
296
+ indv_game_rot_teams = game_rot.drop_duplicates(subset='TEAM_ABBREVIATION')
297
+ total_game_rot_teams = indv_game_rot_teams.TEAM_ABBREVIATION.values.tolist()
298
+ indv_players = gamelog_table.drop_duplicates(subset='Player')
299
+ total_players = indv_players.Player.values.tolist()
300
+ total_dates = gamelog_table.Date.values.tolist()
 
301
 
302
  # tab1, tab2, tab3, tab4, tab5 = st.tabs(['Gamelogs', 'Correlation Matrix', 'Position vs. Opp', 'Positional Percentages', 'Game Rotations'])
303