Spaces:
Running
Running
James McCool
commited on
Commit
·
d9cc32f
1
Parent(s):
6215ea9
Enhance Advanced view by adding subscription notice links and improving column configurations for scoring percentages
Browse files
app.py
CHANGED
|
@@ -361,21 +361,56 @@ with tab1:
|
|
| 361 |
column_config={
|
| 362 |
"Names": st.column_config.LinkColumn(
|
| 363 |
"Teams",
|
|
|
|
| 364 |
help="The Team being projected"
|
| 365 |
),
|
| 366 |
"8+ Runs": st.column_config.LinkColumn(
|
| 367 |
"8+ Runs",
|
|
|
|
| 368 |
help="How often the team scores eight or more runs, a threshold that indicates upside for GPPs"
|
| 369 |
),
|
| 370 |
"Own%": st.column_config.LinkColumn(
|
| 371 |
"Own%",
|
|
|
|
| 372 |
help="The projected sum ownership of hitters on the Team"
|
| 373 |
)
|
| 374 |
}, height=750, use_container_width = True, hide_index = True)
|
| 375 |
elif view_var == "Advanced":
|
| 376 |
for col in ['Names', 'Avg Fifth Inning', 'Fifth Inning Lead Percentage', 'Top Score', '8+ Runs', 'Own%']:
|
| 377 |
-
scoring_percentages[col] = '
|
| 378 |
-
st.dataframe(scoring_percentages.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(game_format, precision=2),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 379 |
|
| 380 |
with tab2:
|
| 381 |
st.header("Player ROO")
|
|
|
|
| 361 |
column_config={
|
| 362 |
"Names": st.column_config.LinkColumn(
|
| 363 |
"Teams",
|
| 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,
|
| 375 |
help="The projected sum ownership of hitters on the Team"
|
| 376 |
)
|
| 377 |
}, height=750, use_container_width = True, hide_index = True)
|
| 378 |
elif view_var == "Advanced":
|
| 379 |
for col in ['Names', 'Avg Fifth Inning', 'Fifth Inning Lead Percentage', 'Top Score', '8+ Runs', 'Own%']:
|
| 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={
|
| 383 |
+
"Names": st.column_config.LinkColumn(
|
| 384 |
+
"Teams",
|
| 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,
|
| 411 |
+
help="The projected sum ownership of hitters on the Team"
|
| 412 |
+
)
|
| 413 |
+
}, height=750, use_container_width = True, hide_index = True)
|
| 414 |
|
| 415 |
with tab2:
|
| 416 |
st.header("Player ROO")
|