James McCool commited on
Commit
c3df02a
·
1 Parent(s): 1726c68

Update timestamp display logic in streamlit_app.py to differentiate between 'Regular' and 'Showdown' slate types, ensuring accurate last update information is shown based on the selected type. This enhances user experience and data accuracy in the application.

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +12 -3
src/streamlit_app.py CHANGED
@@ -1052,7 +1052,10 @@ if selected_tab == 'Stacks ROO':
1052
 
1053
  print(st.session_state)
1054
  player_stats, dk_stacks_raw, fd_stacks_raw, dk_roo_raw, fd_roo_raw, dk_sd_roo_raw, fd_sd_roo_raw, dk_id_map, fd_id_map, dk_sd_id_map, fd_sd_id_map = init_baselines(type_var)
1055
- t_stamp = f"Last Update: " + str(dk_roo_raw['timestamp'][0]) + f" CST"
 
 
 
1056
  with st.expander("Info and Filters"):
1057
  st.info(t_stamp)
1058
  with st.container():
@@ -1091,7 +1094,10 @@ if selected_tab == 'Player ROO':
1091
 
1092
  print(st.session_state)
1093
  player_stats, dk_stacks_raw, fd_stacks_raw, dk_roo_raw, fd_roo_raw, dk_sd_roo_raw, fd_sd_roo_raw, dk_id_map, fd_id_map, dk_sd_id_map, fd_sd_id_map = init_baselines(type_var)
1094
- t_stamp = f"Last Update: " + str(dk_roo_raw['timestamp'][0]) + f" CST"
 
 
 
1095
  with st.expander("Info and Filters"):
1096
  st.info(t_stamp)
1097
  if type_var == 'Regular':
@@ -1193,7 +1199,10 @@ if selected_tab == 'Player ROO':
1193
 
1194
  if selected_tab == 'Optimals':
1195
  player_stats, dk_stacks_raw, fd_stacks_raw, dk_roo_raw, fd_roo_raw, dk_sd_roo_raw, fd_sd_roo_raw, dk_id_map, fd_id_map, dk_sd_id_map, fd_sd_id_map = init_baselines(type_var)
1196
- t_stamp = f"Last Update: " + str(dk_roo_raw['timestamp'][0]) + f" CST"
 
 
 
1197
  st.header("Optimals")
1198
  with st.expander("Info and Filters"):
1199
  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.")
 
1052
 
1053
  print(st.session_state)
1054
  player_stats, dk_stacks_raw, fd_stacks_raw, dk_roo_raw, fd_roo_raw, dk_sd_roo_raw, fd_sd_roo_raw, dk_id_map, fd_id_map, dk_sd_id_map, fd_sd_id_map = init_baselines(type_var)
1055
+ if type_var == 'Regular':
1056
+ t_stamp = f"Last Update: " + str(dk_roo_raw['timestamp'][0]) + f" CST"
1057
+ elif type_var == 'Showdown':
1058
+ t_stamp = f"Last Update: " + str(dk_sd_roo_raw['timestamp'][0]) + f" CST"
1059
  with st.expander("Info and Filters"):
1060
  st.info(t_stamp)
1061
  with st.container():
 
1094
 
1095
  print(st.session_state)
1096
  player_stats, dk_stacks_raw, fd_stacks_raw, dk_roo_raw, fd_roo_raw, dk_sd_roo_raw, fd_sd_roo_raw, dk_id_map, fd_id_map, dk_sd_id_map, fd_sd_id_map = init_baselines(type_var)
1097
+ if type_var == 'Regular':
1098
+ t_stamp = f"Last Update: " + str(dk_roo_raw['timestamp'][0]) + f" CST"
1099
+ elif type_var == 'Showdown':
1100
+ t_stamp = f"Last Update: " + str(dk_sd_roo_raw['timestamp'][0]) + f" CST"
1101
  with st.expander("Info and Filters"):
1102
  st.info(t_stamp)
1103
  if type_var == 'Regular':
 
1199
 
1200
  if selected_tab == 'Optimals':
1201
  player_stats, dk_stacks_raw, fd_stacks_raw, dk_roo_raw, fd_roo_raw, dk_sd_roo_raw, fd_sd_roo_raw, dk_id_map, fd_id_map, dk_sd_id_map, fd_sd_id_map = init_baselines(type_var)
1202
+ if type_var == 'Regular':
1203
+ t_stamp = f"Last Update: " + str(dk_roo_raw['timestamp'][0]) + f" CST"
1204
+ elif type_var == 'Showdown':
1205
+ t_stamp = f"Last Update: " + str(dk_sd_roo_raw['timestamp'][0]) + f" CST"
1206
  st.header("Optimals")
1207
  with st.expander("Info and Filters"):
1208
  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.")