James McCool
commited on
Commit
·
9d5e50f
1
Parent(s):
9fddcf9
adding explicit position lists for sports
Browse files
app.py
CHANGED
|
@@ -123,6 +123,39 @@ stack_column_dict = {
|
|
| 123 |
},
|
| 124 |
},
|
| 125 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 126 |
player_wrong_names_mlb = ['Enrique Hernandez', 'Joseph Cantillo', 'Mike Soroka', 'Jakob Bauers', 'Temi Fágbénlé']
|
| 127 |
player_right_names_mlb = ['Kike Hernandez', 'Joey Cantillo', 'Michael Soroka', 'Jake Bauers', 'Temi Fagbenle']
|
| 128 |
|
|
@@ -2152,7 +2185,7 @@ if selected_tab == 'Manage Portfolio':
|
|
| 2152 |
position_filter = st.selectbox("Filter on:", options=pos_parse_options)
|
| 2153 |
position_low_threshold = st.number_input("if filtering on Projection/Ownership/Salary, Low Threshold", value=0.0, min_value=0.0, step=1.0)
|
| 2154 |
position_high_threshold = st.number_input("if filtering on Projection/Ownership/Salary, High Threshold", value=20000.0, min_value=0.0, step=1.0)
|
| 2155 |
-
filter_keys_pos = st.multiselect("if filtering on Position, Position(s) to keep", options=[
|
| 2156 |
filter_keys_team = st.multiselect("if filtering on Team, Team(s) to keep", options=st.session_state['portfolio_inc_proj']['team'].unique(), default=[])
|
| 2157 |
submitted_col, export_col = st.columns(2)
|
| 2158 |
with submitted_col:
|
|
|
|
| 123 |
},
|
| 124 |
},
|
| 125 |
}
|
| 126 |
+
|
| 127 |
+
sport_position_lists = {
|
| 128 |
+
'Draftkings': {
|
| 129 |
+
'MLB': ['P', 'C', '1B', '2B', '3B', 'SS', 'OF'],
|
| 130 |
+
'NHL': ['C', 'W', 'D', 'G'],
|
| 131 |
+
'NFL': ['QB', 'RB', 'WR', 'TE'],
|
| 132 |
+
'LOL': ['TOP', 'JNG', 'MID', 'ADC', 'SUP', 'TEAM'],
|
| 133 |
+
'NCAAF': ['QB', 'WR', 'RB'],
|
| 134 |
+
'MMA': ['FLEX'],
|
| 135 |
+
'GOLF': ['FLEX'],
|
| 136 |
+
'TENNIS': ['FLEX'],
|
| 137 |
+
'WNBA': ['G', 'F'],
|
| 138 |
+
'NBA': ['PG', 'SG', 'SF', 'PF', 'C'],
|
| 139 |
+
'NASCAR': ['FLEX'],
|
| 140 |
+
'F1': ['DRIVER', 'CONST'],
|
| 141 |
+
'SOC': ['F', 'M', 'D', 'GK'],
|
| 142 |
+
},
|
| 143 |
+
'Fanduel': {
|
| 144 |
+
'MLB': ['P', 'C', '1B', '2B', '3B', 'SS', 'OF'],
|
| 145 |
+
'NHL': ['C', 'W', 'D', 'G'],
|
| 146 |
+
'NFL': ['QB', 'RB', 'WR', 'TE'],
|
| 147 |
+
'LOL': ['TOP', 'JNG', 'MID', 'ADC', 'SUP', 'TEAM'],
|
| 148 |
+
'NCAAF': ['QB', 'WR', 'RB'],
|
| 149 |
+
'MMA': ['FLEX'],
|
| 150 |
+
'GOLF': ['FLEX'],
|
| 151 |
+
'TENNIS': ['FLEX'],
|
| 152 |
+
'WNBA': ['G', 'F'],
|
| 153 |
+
'NBA': ['PG', 'SG', 'SF', 'PF', 'C'],
|
| 154 |
+
'NASCAR': ['FLEX'],
|
| 155 |
+
'F1': ['DRIVER', 'CONST'],
|
| 156 |
+
'SOC': ['F', 'M', 'D', 'GK'],
|
| 157 |
+
},
|
| 158 |
+
}
|
| 159 |
player_wrong_names_mlb = ['Enrique Hernandez', 'Joseph Cantillo', 'Mike Soroka', 'Jakob Bauers', 'Temi Fágbénlé']
|
| 160 |
player_right_names_mlb = ['Kike Hernandez', 'Joey Cantillo', 'Michael Soroka', 'Jake Bauers', 'Temi Fagbenle']
|
| 161 |
|
|
|
|
| 2185 |
position_filter = st.selectbox("Filter on:", options=pos_parse_options)
|
| 2186 |
position_low_threshold = st.number_input("if filtering on Projection/Ownership/Salary, Low Threshold", value=0.0, min_value=0.0, step=1.0)
|
| 2187 |
position_high_threshold = st.number_input("if filtering on Projection/Ownership/Salary, High Threshold", value=20000.0, min_value=0.0, step=1.0)
|
| 2188 |
+
filter_keys_pos = st.multiselect("if filtering on Position, Position(s) to keep", options=sport_position_lists[site_var][sport_var], default=[])
|
| 2189 |
filter_keys_team = st.multiselect("if filtering on Team, Team(s) to keep", options=st.session_state['portfolio_inc_proj']['team'].unique(), default=[])
|
| 2190 |
submitted_col, export_col = st.columns(2)
|
| 2191 |
with submitted_col:
|