Spaces:
Running
Running
James McCool
commited on
Commit
·
1f0343f
1
Parent(s):
ea0e6b2
added a "simple" view for mobile
Browse files
app.py
CHANGED
@@ -179,6 +179,8 @@ with tab1:
|
|
179 |
t_stamp = f"Last Update: " + str(timestamp) + f" CST"
|
180 |
for key in st.session_state.keys():
|
181 |
del st.session_state[key]
|
|
|
|
|
182 |
site_var2 = st.radio("What table would you like to display?", ('Draftkings', 'Fanduel'), key='site_var2')
|
183 |
if site_var2 == 'Draftkings':
|
184 |
site_baselines = roo_raw[roo_raw['site'] == 'Draftkings']
|
@@ -212,7 +214,10 @@ with tab1:
|
|
212 |
display_container_1 = st.empty()
|
213 |
display_dl_container_1 = st.empty()
|
214 |
display_proj = raw_baselines[raw_baselines['Team'].isin(team_var2)]
|
215 |
-
|
|
|
|
|
|
|
216 |
|
217 |
st.session_state.display_proj = display_proj
|
218 |
|
|
|
179 |
t_stamp = f"Last Update: " + str(timestamp) + f" CST"
|
180 |
for key in st.session_state.keys():
|
181 |
del st.session_state[key]
|
182 |
+
view_var2 = st.radio("What view would you like to display?", ('Advanced', 'Simple'), key='view_var2')
|
183 |
+
st.info("Advanced view includes all stats and thresholds, simple includes just basic columns for ease of use on mobile")
|
184 |
site_var2 = st.radio("What table would you like to display?", ('Draftkings', 'Fanduel'), key='site_var2')
|
185 |
if site_var2 == 'Draftkings':
|
186 |
site_baselines = roo_raw[roo_raw['site'] == 'Draftkings']
|
|
|
214 |
display_container_1 = st.empty()
|
215 |
display_dl_container_1 = st.empty()
|
216 |
display_proj = raw_baselines[raw_baselines['Team'].isin(team_var2)]
|
217 |
+
if view_var2 == 'Advanced':
|
218 |
+
display_proj = display_proj
|
219 |
+
elif view_var2 == 'Simple':
|
220 |
+
display_proj = display_proj[['Player', 'Team', 'Position', 'Minutes Proj', 'Floor', 'Median', 'Ceiling', 'LevX', 'ValX']]
|
221 |
|
222 |
st.session_state.display_proj = display_proj
|
223 |
|