James McCool
commited on
Commit
·
c4f6ff5
1
Parent(s):
04419ae
Update showdown selections and database references for NBA; add 'Auxiliary' option to slate type selection
Browse files- src/streamlit_app.py +11 -9
src/streamlit_app.py
CHANGED
|
@@ -24,12 +24,12 @@ dk_hb_columns = ['PG', 'SG', 'SF', 'PF', 'C', 'G', 'F', 'FLEX']
|
|
| 24 |
fd_hb_columns = ['PG1', 'PG2', 'SG1', 'SG2', 'SF1', 'SF2', 'PF1', 'PF2', 'C']
|
| 25 |
|
| 26 |
showdown_selections = ['Showdown #1', 'Showdown #2', 'Showdown #3', 'Showdown #4', 'Showdown #5', 'Showdown #6', 'Showdown #7', 'Showdown #8', 'Showdown #9', 'Showdown #10', 'Showdown #11', 'Showdown #12', 'Showdown #13', 'Showdown #14', 'Showdown #15']
|
| 27 |
-
dk_db_showdown_selections = ['
|
| 28 |
-
'
|
| 29 |
-
'
|
| 30 |
-
fd_db_showdown_selections = ['
|
| 31 |
-
'
|
| 32 |
-
'
|
| 33 |
|
| 34 |
dk_showdown_db_translation = dict(zip(showdown_selections, dk_db_showdown_selections))
|
| 35 |
fd_showdown_db_translation = dict(zip(showdown_selections, fd_db_showdown_selections))
|
|
@@ -75,9 +75,10 @@ st.markdown("""
|
|
| 75 |
|
| 76 |
@st.cache_resource(ttl=60)
|
| 77 |
def define_dk_showdown_slates():
|
| 78 |
-
collection = db["
|
| 79 |
cursor = collection.find()
|
| 80 |
raw_display = pd.DataFrame(list(cursor))
|
|
|
|
| 81 |
unique_slates = raw_display['slate'].unique()
|
| 82 |
|
| 83 |
slate_names = []
|
|
@@ -92,9 +93,10 @@ def define_dk_showdown_slates():
|
|
| 92 |
|
| 93 |
@st.cache_resource(ttl=60)
|
| 94 |
def define_fd_showdown_slates():
|
| 95 |
-
collection = db["
|
| 96 |
cursor = collection.find()
|
| 97 |
raw_display = pd.DataFrame(list(cursor))
|
|
|
|
| 98 |
unique_slates = raw_display['slate'].unique()
|
| 99 |
|
| 100 |
slate_names = []
|
|
@@ -957,7 +959,7 @@ if selected_tab == 'Player ROO':
|
|
| 957 |
col1, col2, col3 = st.columns(3)
|
| 958 |
|
| 959 |
with col1:
|
| 960 |
-
slate_split = st.radio("Slate Type", ('Main Slate', 'Secondary'), key='slate_split')
|
| 961 |
|
| 962 |
if slate_split == 'Main Slate':
|
| 963 |
if site_var == 'Draftkings':
|
|
|
|
| 24 |
fd_hb_columns = ['PG1', 'PG2', 'SG1', 'SG2', 'SF1', 'SF2', 'PF1', 'PF2', 'C']
|
| 25 |
|
| 26 |
showdown_selections = ['Showdown #1', 'Showdown #2', 'Showdown #3', 'Showdown #4', 'Showdown #5', 'Showdown #6', 'Showdown #7', 'Showdown #8', 'Showdown #9', 'Showdown #10', 'Showdown #11', 'Showdown #12', 'Showdown #13', 'Showdown #14', 'Showdown #15']
|
| 27 |
+
dk_db_showdown_selections = ['DK_NBA_SD_seed_frame_Showdown #1', 'DK_NBA_SD_seed_frame_Showdown #2', 'DK_NBA_SD_seed_frame_Showdown #3', 'DK_NBA_SD_seed_frame_Showdown #4', 'DK_NBA_SD_seed_frame_Showdown #5', 'DK_NBA_SD_seed_frame_Showdown #6',
|
| 28 |
+
'DK_NBA_SD_seed_frame_Showdown #7', 'DK_NBA_SD_seed_frame_Showdown #8', 'DK_NBA_SD_seed_frame_Showdown #9', 'DK_NBA_SD_seed_frame_Showdown #10', 'DK_NBA_SD_seed_frame_Showdown #11', 'DK_NBA_SD_seed_frame_Showdown #12', 'DK_NBA_SD_seed_frame_Showdown #13',
|
| 29 |
+
'DK_NBA_SD_seed_frame_Showdown #14', 'DK_NBA_SD_seed_frame_Showdown #15']
|
| 30 |
+
fd_db_showdown_selections = ['FD_NBA_SD_seed_frame_Showdown #1', 'FD_NBA_SD_seed_frame_Showdown #2', 'FD_NBA_SD_seed_frame_Showdown #3', 'FD_NBA_SD_seed_frame_Showdown #4', 'FD_NBA_SD_seed_frame_Showdown #5', 'FD_NBA_SD_seed_frame_Showdown #6',
|
| 31 |
+
'FD_NBA_SD_seed_frame_Showdown #7', 'FD_NBA_SD_seed_frame_Showdown #8', 'FD_NBA_SD_seed_frame_Showdown #9', 'FD_NBA_SD_seed_frame_Showdown #10', 'FD_NBA_SD_seed_frame_Showdown #11', 'FD_NBA_SD_seed_frame_Showdown #12', 'FD_NBA_SD_seed_frame_Showdown #13',
|
| 32 |
+
'FD_NBA_SD_seed_frame_Showdown #14', 'FD_NBA_SD_seed_frame_Showdown #15']
|
| 33 |
|
| 34 |
dk_showdown_db_translation = dict(zip(showdown_selections, dk_db_showdown_selections))
|
| 35 |
fd_showdown_db_translation = dict(zip(showdown_selections, fd_db_showdown_selections))
|
|
|
|
| 75 |
|
| 76 |
@st.cache_resource(ttl=60)
|
| 77 |
def define_dk_showdown_slates():
|
| 78 |
+
collection = db["Player_SD_Range_Of_Outcomes"]
|
| 79 |
cursor = collection.find()
|
| 80 |
raw_display = pd.DataFrame(list(cursor))
|
| 81 |
+
raw_display = raw_display[raw_display['site'] == 'Draftkings']
|
| 82 |
unique_slates = raw_display['slate'].unique()
|
| 83 |
|
| 84 |
slate_names = []
|
|
|
|
| 93 |
|
| 94 |
@st.cache_resource(ttl=60)
|
| 95 |
def define_fd_showdown_slates():
|
| 96 |
+
collection = db["Player_SD_Range_Of_Outcomes"]
|
| 97 |
cursor = collection.find()
|
| 98 |
raw_display = pd.DataFrame(list(cursor))
|
| 99 |
+
raw_display = raw_display[raw_display['site'] == 'Fanduel']
|
| 100 |
unique_slates = raw_display['slate'].unique()
|
| 101 |
|
| 102 |
slate_names = []
|
|
|
|
| 959 |
col1, col2, col3 = st.columns(3)
|
| 960 |
|
| 961 |
with col1:
|
| 962 |
+
slate_split = st.radio("Slate Type", ('Main Slate', 'Secondary', 'Auxiliary'), key='slate_split')
|
| 963 |
|
| 964 |
if slate_split == 'Main Slate':
|
| 965 |
if site_var == 'Draftkings':
|