Multichem commited on
Commit
1d18c43
1 Parent(s): 66cecca

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -32,7 +32,7 @@ def init_baselines():
32
  sh = gc.open_by_url(master_hold)
33
  worksheet = sh.worksheet('ADPs (model)')
34
  adp_hold = pd.DataFrame(worksheet.get_all_records())
35
- adp_hold = adp_hold[['Player', 'Team', 'Bye', 'Position', 'Position Rank', 'Underdog', 'MFL10', 'RTSPORTS', 'AVG', 'Projection', 'Proj ADP', 'Diff']]
36
  adp_table = adp_hold.drop_duplicates(subset='Player')
37
  adp_table.replace('', np.nan, inplace=True)
38
 
@@ -61,7 +61,7 @@ with tab1:
61
  if st.button("Load/Reset Data", key='reset1'):
62
  st.cache_data.clear()
63
  adp_table, stacks_table, proj_table = init_baselines()
64
- site_var1 = st.radio("What site are you playing?", ('Underdog', 'MFL10'), key='site_var1')
65
  split_var1 = st.radio("Would you like to run stack analysis for the full slate or individual teams?", ('All Teams', 'Specific Teams'), key='split_var1')
66
  if split_var1 == 'Specific Teams':
67
  team_var1 = st.multiselect('Which teams would you like to include in the analysis?', options = adp_table['Team'].unique(), key='team_var1')
@@ -143,7 +143,7 @@ with tab4:
143
  if st.button("Load/Reset Data", key='reset4'):
144
  st.cache_data.clear()
145
  adp_table, stacks_table, proj_table = init_baselines()
146
- site_var4 = st.radio("What site are you playing?", ('Underdog', 'MFL10'), key='site_var2')
147
  split_var4 = st.radio("Would you like to run stack analysis for the full slate or individual teams?", ('All Teams', 'Specific Teams'), key='split_var4')
148
  if split_var4 == 'Specific Teams':
149
  team_var4 = st.multiselect('Which teams would you like to include in the analysis?', options = adp_table['Team'].unique(), key='team_var4')
@@ -156,8 +156,8 @@ with tab4:
156
  pos_var4 = adp_table.Position.unique().tolist()
157
  if site_var4 == 'Underdog':
158
  adp_dict = dict(zip(adp_table.Player, adp_table.Underdog))
159
- elif site_var4 == 'MFL10':
160
- adp_dict = dict(zip(adp_table.Player, adp_table.MFL10))
161
  size_var4 = st.number_input('What size of stacks are you analyzing?', min_value = 3, max_value = 6, step=1)
162
  stack_size = size_var4
163
  cut_var4 = st.radio("Do you want to remove stacks with a negative average value?", ('Yes', 'No'), key='cut_var4')
 
32
  sh = gc.open_by_url(master_hold)
33
  worksheet = sh.worksheet('ADPs (model)')
34
  adp_hold = pd.DataFrame(worksheet.get_all_records())
35
+ adp_hold = adp_hold[['Player', 'Team', 'Bye', 'Position', 'Position Rank', 'Underdog', 'MFL10', 'Draftkings', 'AVG', 'Projection', 'Proj ADP', 'Diff']]
36
  adp_table = adp_hold.drop_duplicates(subset='Player')
37
  adp_table.replace('', np.nan, inplace=True)
38
 
 
61
  if st.button("Load/Reset Data", key='reset1'):
62
  st.cache_data.clear()
63
  adp_table, stacks_table, proj_table = init_baselines()
64
+ site_var1 = st.radio("What site are you playing?", ('Underdog', 'Draftkings'), key='site_var1')
65
  split_var1 = st.radio("Would you like to run stack analysis for the full slate or individual teams?", ('All Teams', 'Specific Teams'), key='split_var1')
66
  if split_var1 == 'Specific Teams':
67
  team_var1 = st.multiselect('Which teams would you like to include in the analysis?', options = adp_table['Team'].unique(), key='team_var1')
 
143
  if st.button("Load/Reset Data", key='reset4'):
144
  st.cache_data.clear()
145
  adp_table, stacks_table, proj_table = init_baselines()
146
+ site_var4 = st.radio("What site are you playing?", ('Underdog', 'Draftkings'), key='site_var2')
147
  split_var4 = st.radio("Would you like to run stack analysis for the full slate or individual teams?", ('All Teams', 'Specific Teams'), key='split_var4')
148
  if split_var4 == 'Specific Teams':
149
  team_var4 = st.multiselect('Which teams would you like to include in the analysis?', options = adp_table['Team'].unique(), key='team_var4')
 
156
  pos_var4 = adp_table.Position.unique().tolist()
157
  if site_var4 == 'Underdog':
158
  adp_dict = dict(zip(adp_table.Player, adp_table.Underdog))
159
+ elif site_var4 == 'Draftkings':
160
+ adp_dict = dict(zip(adp_table.Player, adp_table.Draftkings))
161
  size_var4 = st.number_input('What size of stacks are you analyzing?', min_value = 3, max_value = 6, step=1)
162
  stack_size = size_var4
163
  cut_var4 = st.radio("Do you want to remove stacks with a negative average value?", ('Yes', 'No'), key='cut_var4')