Spaces:
Running
Running
James McCool
commited on
Commit
·
e26383c
1
Parent(s):
72a627e
removed position specific exposures lists
Browse files
app.py
CHANGED
@@ -592,7 +592,7 @@ with tab1:
|
|
592 |
else:
|
593 |
st.write("Simulation data or position mapping not available.")
|
594 |
with st.container():
|
595 |
-
tab1, tab2
|
596 |
with tab1:
|
597 |
if 'player_freq' in st.session_state:
|
598 |
|
@@ -604,95 +604,8 @@ with tab1:
|
|
604 |
mime='text/csv',
|
605 |
key='overall'
|
606 |
)
|
|
|
607 |
with tab2:
|
608 |
-
if 'pg_freq' in st.session_state:
|
609 |
-
|
610 |
-
st.dataframe(st.session_state.pg_freq.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(freq_format, precision=2), use_container_width = True)
|
611 |
-
st.download_button(
|
612 |
-
label="Export Exposures",
|
613 |
-
data=st.session_state.pg_freq.to_csv().encode('utf-8'),
|
614 |
-
file_name='pg_freq.csv',
|
615 |
-
mime='text/csv',
|
616 |
-
key='pg'
|
617 |
-
)
|
618 |
-
with tab3:
|
619 |
-
if 'sg_freq' in st.session_state:
|
620 |
-
|
621 |
-
st.dataframe(st.session_state.sg_freq.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(freq_format, precision=2), use_container_width = True)
|
622 |
-
st.download_button(
|
623 |
-
label="Export Exposures",
|
624 |
-
data=st.session_state.sg_freq.to_csv().encode('utf-8'),
|
625 |
-
file_name='sg_freq.csv',
|
626 |
-
mime='text/csv',
|
627 |
-
key='sg'
|
628 |
-
)
|
629 |
-
with tab4:
|
630 |
-
if 'sf_freq' in st.session_state:
|
631 |
-
|
632 |
-
st.dataframe(st.session_state.sf_freq.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(freq_format, precision=2), use_container_width = True)
|
633 |
-
st.download_button(
|
634 |
-
label="Export Exposures",
|
635 |
-
data=st.session_state.sf_freq.to_csv().encode('utf-8'),
|
636 |
-
file_name='sf_freq.csv',
|
637 |
-
mime='text/csv',
|
638 |
-
key='sf'
|
639 |
-
)
|
640 |
-
with tab5:
|
641 |
-
if 'pf_freq' in st.session_state:
|
642 |
-
|
643 |
-
st.dataframe(st.session_state.pf_freq.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(freq_format, precision=2), use_container_width = True)
|
644 |
-
st.download_button(
|
645 |
-
label="Export Exposures",
|
646 |
-
data=st.session_state.pf_freq.to_csv().encode('utf-8'),
|
647 |
-
file_name='pf_freq.csv',
|
648 |
-
mime='text/csv',
|
649 |
-
key='pf'
|
650 |
-
)
|
651 |
-
with tab6:
|
652 |
-
if 'c_freq' in st.session_state:
|
653 |
-
|
654 |
-
st.dataframe(st.session_state.c_freq.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(freq_format, precision=2), use_container_width = True)
|
655 |
-
st.download_button(
|
656 |
-
label="Export Exposures",
|
657 |
-
data=st.session_state.c_freq.to_csv().encode('utf-8'),
|
658 |
-
file_name='c_freq.csv',
|
659 |
-
mime='text/csv',
|
660 |
-
key='c'
|
661 |
-
)
|
662 |
-
with tab7:
|
663 |
-
if 'g_freq' in st.session_state:
|
664 |
-
|
665 |
-
st.dataframe(st.session_state.g_freq.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(freq_format, precision=2), use_container_width = True)
|
666 |
-
st.download_button(
|
667 |
-
label="Export Exposures",
|
668 |
-
data=st.session_state.g_freq.to_csv().encode('utf-8'),
|
669 |
-
file_name='g_freq.csv',
|
670 |
-
mime='text/csv',
|
671 |
-
key='g'
|
672 |
-
)
|
673 |
-
with tab8:
|
674 |
-
if 'f_freq' in st.session_state:
|
675 |
-
|
676 |
-
st.dataframe(st.session_state.f_freq.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(freq_format, precision=2), use_container_width = True)
|
677 |
-
st.download_button(
|
678 |
-
label="Export Exposures",
|
679 |
-
data=st.session_state.f_freq.to_csv().encode('utf-8'),
|
680 |
-
file_name='f_freq.csv',
|
681 |
-
mime='text/csv',
|
682 |
-
key='f'
|
683 |
-
)
|
684 |
-
with tab9:
|
685 |
-
if 'flex_freq' in st.session_state:
|
686 |
-
|
687 |
-
st.dataframe(st.session_state.flex_freq.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(freq_format, precision=2), use_container_width = True)
|
688 |
-
st.download_button(
|
689 |
-
label="Export Exposures",
|
690 |
-
data=st.session_state.flex_freq.to_csv().encode('utf-8'),
|
691 |
-
file_name='flex_freq.csv',
|
692 |
-
mime='text/csv',
|
693 |
-
key='flex'
|
694 |
-
)
|
695 |
-
with tab10:
|
696 |
if 'team_freq' in st.session_state:
|
697 |
|
698 |
st.dataframe(st.session_state.team_freq.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(freq_format, precision=2), use_container_width = True)
|
|
|
592 |
else:
|
593 |
st.write("Simulation data or position mapping not available.")
|
594 |
with st.container():
|
595 |
+
tab1, tab2 = st.tabs(['Overall Exposures', 'Team Exposures'])
|
596 |
with tab1:
|
597 |
if 'player_freq' in st.session_state:
|
598 |
|
|
|
604 |
mime='text/csv',
|
605 |
key='overall'
|
606 |
)
|
607 |
+
|
608 |
with tab2:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
609 |
if 'team_freq' in st.session_state:
|
610 |
|
611 |
st.dataframe(st.session_state.team_freq.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(freq_format, precision=2), use_container_width = True)
|