Spaces:
Running
Running
James McCool
commited on
Commit
·
9f4d2e6
1
Parent(s):
d9cc32f
Add subscription notice in the demo section and streamline scoring percentages columns in both Simple and Advanced views
Browse files
app.py
CHANGED
@@ -276,6 +276,7 @@ hold_display = roo_data
|
|
276 |
with tab1:
|
277 |
st.header("Scoring Percentages")
|
278 |
with st.expander("Info and Filters"):
|
|
|
279 |
with st.container():
|
280 |
slate_var1 = st.radio("Which data are you loading?", ('Main Slate', 'Secondary Slate', 'Turbo Slate'), key='slate_var1')
|
281 |
own_var1 = st.radio("How would you like to display team ownership?", ('Sum', 'Average'), key='own_var1')
|
@@ -355,7 +356,7 @@ with tab1:
|
|
355 |
|
356 |
if view_var == "Simple":
|
357 |
scoring_percentages = scoring_percentages[['Names', 'Runs', '8+ Runs', 'Win%', 'LevX', 'Own%']]
|
358 |
-
for col in ['Names', '
|
359 |
scoring_percentages[col] = 'https://paydirtdfs.com/subscriptions-choices/'
|
360 |
st.dataframe(scoring_percentages.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(game_format, precision=2),
|
361 |
column_config={
|
@@ -364,11 +365,6 @@ with tab1:
|
|
364 |
max_chars=25,
|
365 |
help="The Team being projected"
|
366 |
),
|
367 |
-
"8+ Runs": st.column_config.LinkColumn(
|
368 |
-
"8+ Runs",
|
369 |
-
max_chars=25,
|
370 |
-
help="How often the team scores eight or more runs, a threshold that indicates upside for GPPs"
|
371 |
-
),
|
372 |
"Own%": st.column_config.LinkColumn(
|
373 |
"Own%",
|
374 |
max_chars=25,
|
@@ -376,7 +372,7 @@ with tab1:
|
|
376 |
)
|
377 |
}, height=750, use_container_width = True, hide_index = True)
|
378 |
elif view_var == "Advanced":
|
379 |
-
for col in ['Names', '
|
380 |
scoring_percentages[col] = 'https://paydirtdfs.com/subscriptions-choices/'
|
381 |
st.dataframe(scoring_percentages.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(game_format, precision=2),
|
382 |
column_config={
|
@@ -385,26 +381,6 @@ with tab1:
|
|
385 |
max_chars=25,
|
386 |
help="The Team being projected"
|
387 |
),
|
388 |
-
"Avg Fifth Inning": st.column_config.LinkColumn(
|
389 |
-
"Avg Fifth Inning",
|
390 |
-
max_chars=25,
|
391 |
-
help="The average amount of Runs the Team scores at the end of the Fifth Inning"
|
392 |
-
),
|
393 |
-
"Fifth Inning Lead Percentage": st.column_config.LinkColumn(
|
394 |
-
"Fifth Inning Lead Percentage",
|
395 |
-
max_chars=25,
|
396 |
-
help="The percentage chance that the Team is leading in their game at the end of the Fifth Inning"
|
397 |
-
),
|
398 |
-
"Top Score": st.column_config.LinkColumn(
|
399 |
-
"Top Score",
|
400 |
-
max_chars=25,
|
401 |
-
help="The percentage chance a Team is the top scoring (in runs) on the slate"
|
402 |
-
),
|
403 |
-
"8+ Runs": st.column_config.LinkColumn(
|
404 |
-
"8+ Runs",
|
405 |
-
max_chars=25,
|
406 |
-
help="How often the team scores eight or more runs, a threshold that indicates upside for GPPs"
|
407 |
-
),
|
408 |
"Own%": st.column_config.LinkColumn(
|
409 |
"Own%",
|
410 |
max_chars=25,
|
|
|
276 |
with tab1:
|
277 |
st.header("Scoring Percentages")
|
278 |
with st.expander("Info and Filters"):
|
279 |
+
st.info("In this demo you'll be able to see information and statistics, but names/teams have been redacted. To see more information, grab a subscription! (https://paydirtdfs.com/subscriptions-choices/)")
|
280 |
with st.container():
|
281 |
slate_var1 = st.radio("Which data are you loading?", ('Main Slate', 'Secondary Slate', 'Turbo Slate'), key='slate_var1')
|
282 |
own_var1 = st.radio("How would you like to display team ownership?", ('Sum', 'Average'), key='own_var1')
|
|
|
356 |
|
357 |
if view_var == "Simple":
|
358 |
scoring_percentages = scoring_percentages[['Names', 'Runs', '8+ Runs', 'Win%', 'LevX', 'Own%']]
|
359 |
+
for col in ['Names', 'Own%']:
|
360 |
scoring_percentages[col] = 'https://paydirtdfs.com/subscriptions-choices/'
|
361 |
st.dataframe(scoring_percentages.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(game_format, precision=2),
|
362 |
column_config={
|
|
|
365 |
max_chars=25,
|
366 |
help="The Team being projected"
|
367 |
),
|
|
|
|
|
|
|
|
|
|
|
368 |
"Own%": st.column_config.LinkColumn(
|
369 |
"Own%",
|
370 |
max_chars=25,
|
|
|
372 |
)
|
373 |
}, height=750, use_container_width = True, hide_index = True)
|
374 |
elif view_var == "Advanced":
|
375 |
+
for col in ['Names', 'Own%']:
|
376 |
scoring_percentages[col] = 'https://paydirtdfs.com/subscriptions-choices/'
|
377 |
st.dataframe(scoring_percentages.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(game_format, precision=2),
|
378 |
column_config={
|
|
|
381 |
max_chars=25,
|
382 |
help="The Team being projected"
|
383 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
384 |
"Own%": st.column_config.LinkColumn(
|
385 |
"Own%",
|
386 |
max_chars=25,
|