Multichem commited on
Commit
a2ca848
·
1 Parent(s): 1b8ac07

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -6
app.py CHANGED
@@ -196,6 +196,8 @@ with tab2:
196
  st.cache_data.clear()
197
  wr_matchups = coverage_matchups()
198
  stat_type_var2 = st.radio("What table are you loading?", ('WR/TE Coverage Matchups', 'Nothing idk lol'))
 
 
199
  split_var2 = st.radio("Are you running the the whole league or certain teams?", ('All Teams', 'Specific Teams'))
200
  pos_split2 = st.radio("Are you viewing all positions or specific positions?", ('All Positions', 'Specific Positions'))
201
  if pos_split2 == 'Specific Positions':
@@ -210,6 +212,8 @@ with tab2:
210
  slate_table_instance = wr_matchups
211
  slate_table_instance = slate_table_instance[slate_table_instance['Team'].isin(team_var2)]
212
  slate_table_instance = slate_table_instance[slate_table_instance['Position'].isin(pos_var2)]
 
 
213
  slate_table_instance = slate_table_instance.set_index('name')
214
  elif stat_type_var1 == 'Nothing idk lol':
215
  slate_table_instance = wr_matchups
@@ -219,9 +223,10 @@ with tab2:
219
  st.dataframe(slate_table_instance.style.background_gradient(axis=0).background_gradient(cmap = 'RdYlGn').format(precision=2), use_container_width = True)
220
  elif stat_type_var2 == 'Nothing idk lol':
221
  st.write('lol same bro but yo the vibes immaculate')
222
- st.download_button(
223
- label="Export Tables",
224
- data=convert_df_to_csv(slate_table_instance),
225
- file_name='NFL_Slate_Research_export.csv',
226
- mime='text/csv',
227
- )
 
 
196
  st.cache_data.clear()
197
  wr_matchups = coverage_matchups()
198
  stat_type_var2 = st.radio("What table are you loading?", ('WR/TE Coverage Matchups', 'Nothing idk lol'))
199
+ if stat_type_var2 == 'WR/TE Coverage Matchups':
200
+ routes_var2 = st.slider("Is there a certain price range of routes you want to include?", 0, 50, (10, 50), key='sal_var2')
201
  split_var2 = st.radio("Are you running the the whole league or certain teams?", ('All Teams', 'Specific Teams'))
202
  pos_split2 = st.radio("Are you viewing all positions or specific positions?", ('All Positions', 'Specific Positions'))
203
  if pos_split2 == 'Specific Positions':
 
212
  slate_table_instance = wr_matchups
213
  slate_table_instance = slate_table_instance[slate_table_instance['Team'].isin(team_var2)]
214
  slate_table_instance = slate_table_instance[slate_table_instance['Position'].isin(pos_var2)]
215
+ slate_table_instance = slate_table_instance[slate_table_instance['Avg Routes'] >= routes_var2[0]]
216
+ slate_table_instance = slate_table_instance[slate_table_instance['Avg Routes'] <= routes_var2[1]]
217
  slate_table_instance = slate_table_instance.set_index('name')
218
  elif stat_type_var1 == 'Nothing idk lol':
219
  slate_table_instance = wr_matchups
 
223
  st.dataframe(slate_table_instance.style.background_gradient(axis=0).background_gradient(cmap = 'RdYlGn').format(precision=2), use_container_width = True)
224
  elif stat_type_var2 == 'Nothing idk lol':
225
  st.write('lol same bro but yo the vibes immaculate')
226
+ if stat_type_var2 == 'WR/TE Coverage Matchups':
227
+ st.download_button(
228
+ label="Export Tables",
229
+ data=convert_df_to_csv(slate_table_instance),
230
+ file_name='NFL_Slate_Research_export.csv',
231
+ mime='text/csv',
232
+ )