James McCool commited on
Commit
d30a028
·
1 Parent(s): 817f7c9

Rename tab variables in Streamlit app for improved readability and consistency

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +8 -8
src/streamlit_app.py CHANGED
@@ -334,9 +334,9 @@ player_stats, dk_stacks_raw, fd_stacks_raw, dk_roo_raw, fd_roo_raw, dk_sd_roo_ra
334
 
335
  t_stamp = f"Last Update: " + str(dk_roo_raw['timestamp'][0]) + f" CST"
336
 
337
- tab1, tab2, tab3, tab4 = st.tabs(["Stacks ROO", "Player ROO", "Optimals", "Handbuilder"])
338
 
339
- with tab1:
340
  with st.expander("Info and Filters"):
341
  st.info(t_stamp)
342
  with st.container():
@@ -371,7 +371,7 @@ with tab1:
371
  key='stacks_export_button'
372
  )
373
 
374
- with tab2:
375
  with st.expander("Info and Filters"):
376
  st.info(t_stamp)
377
  slate_var2 = st.radio("Which data are you loading?", ('Main Slate', 'Secondary Slate', 'Late Slate', 'Thurs-Mon Slate'), key='slate_var2_radio')
@@ -434,7 +434,7 @@ with tab2:
434
  key='player_export_button'
435
  )
436
 
437
- with tab3:
438
  st.header("Optimals")
439
  with st.expander("Info and Filters"):
440
  st.info("These filters will display various optimals in the table below to pick from. If you want to export the entire set of 10,000 optimals, hit the 'Prepare full data export' button. If you would like to apply the filters here to the 10,000 optimals before you export, use the 'Prepare full data export (Filter)' button.")
@@ -849,8 +849,8 @@ with tab3:
849
  }).background_gradient(cmap='RdYlGn', axis=0, subset=['Salary', 'Proj', 'Own']), use_container_width=True, key='optimal_stats_dataframe')
850
 
851
  with st.container():
852
- tab1, tab2 = st.tabs(["Display Frequency", "Seed Frame Frequency"])
853
- with tab1:
854
  if 'data_export_display' in st.session_state:
855
  if site_var == 'Draftkings':
856
  if slate_type_var3 == 'Regular':
@@ -893,7 +893,7 @@ with tab3:
893
  mime='text/csv',
894
  key='export_player_frequency_button'
895
  )
896
- with tab2:
897
  if 'working_seed' in st.session_state:
898
  if site_var == 'Draftkings':
899
  if slate_type_var3 == 'Regular':
@@ -936,7 +936,7 @@ with tab3:
936
  key='export_seed_frame_frequency_button'
937
  )
938
 
939
- with tab4:
940
  col1, col2 = st.columns(2)
941
  with col1:
942
  st.header("Handbuilder")
 
334
 
335
  t_stamp = f"Last Update: " + str(dk_roo_raw['timestamp'][0]) + f" CST"
336
 
337
+ stacks_tab, player_tab, optimals_tab, handbuilder_tab = st.tabs(["Stacks ROO", "Player ROO", "Optimals", "Handbuilder"])
338
 
339
+ with stacks_tab:
340
  with st.expander("Info and Filters"):
341
  st.info(t_stamp)
342
  with st.container():
 
371
  key='stacks_export_button'
372
  )
373
 
374
+ with player_tab:
375
  with st.expander("Info and Filters"):
376
  st.info(t_stamp)
377
  slate_var2 = st.radio("Which data are you loading?", ('Main Slate', 'Secondary Slate', 'Late Slate', 'Thurs-Mon Slate'), key='slate_var2_radio')
 
434
  key='player_export_button'
435
  )
436
 
437
+ with optimals_tab:
438
  st.header("Optimals")
439
  with st.expander("Info and Filters"):
440
  st.info("These filters will display various optimals in the table below to pick from. If you want to export the entire set of 10,000 optimals, hit the 'Prepare full data export' button. If you would like to apply the filters here to the 10,000 optimals before you export, use the 'Prepare full data export (Filter)' button.")
 
849
  }).background_gradient(cmap='RdYlGn', axis=0, subset=['Salary', 'Proj', 'Own']), use_container_width=True, key='optimal_stats_dataframe')
850
 
851
  with st.container():
852
+ display_freq_tab, seed_frame_freq_tab = st.tabs(["Display Frequency", "Seed Frame Frequency"])
853
+ with display_freq_tab:
854
  if 'data_export_display' in st.session_state:
855
  if site_var == 'Draftkings':
856
  if slate_type_var3 == 'Regular':
 
893
  mime='text/csv',
894
  key='export_player_frequency_button'
895
  )
896
+ with seed_frame_freq_tab:
897
  if 'working_seed' in st.session_state:
898
  if site_var == 'Draftkings':
899
  if slate_type_var3 == 'Regular':
 
936
  key='export_seed_frame_frequency_button'
937
  )
938
 
939
+ with handbuilder_tab:
940
  col1, col2 = st.columns(2)
941
  with col1:
942
  st.header("Handbuilder")