Spaces:
Sleeping
Sleeping
James McCool
commited on
Commit
·
6b35b8d
1
Parent(s):
926f186
Update league settings in Streamlit app to adjust FLEX position from 2 to 1 and change scoring type from 'Superflex' to 'PPR'. Enhance VORP calculations to support 'TE Premium' scoring type.
Browse files- src/streamlit_app.py +6 -2
src/streamlit_app.py
CHANGED
@@ -120,9 +120,9 @@ league_settings = {
|
|
120 |
'RB': 2,
|
121 |
'WR': 3,
|
122 |
'TE': 1,
|
123 |
-
'FLEX':
|
124 |
'BENCH': 6,
|
125 |
-
'TYPE': '
|
126 |
}
|
127 |
|
128 |
def create_user_config_interface():
|
@@ -373,6 +373,8 @@ def create_custom_rv(frame: pd.DataFrame, pos_reqs: dict, league_settings: dict)
|
|
373 |
rv_type = 'standard'
|
374 |
elif league_settings['TYPE'] == 'Superflex':
|
375 |
rv_type = 'halfPpr'
|
|
|
|
|
376 |
|
377 |
rv_dict = {}
|
378 |
|
@@ -390,6 +392,8 @@ def assign_vorp(frame: pd.DataFrame, halfPpr_rv: dict, custom_rv: dict, league_s
|
|
390 |
rv_type = 'standard'
|
391 |
elif league_settings['TYPE'] == 'Superflex':
|
392 |
rv_type = 'halfPpr'
|
|
|
|
|
393 |
|
394 |
vorp_frame = pd.DataFrame()
|
395 |
for positions in ['QB', 'RB', 'WR', 'TE']:
|
|
|
120 |
'RB': 2,
|
121 |
'WR': 3,
|
122 |
'TE': 1,
|
123 |
+
'FLEX': 1,
|
124 |
'BENCH': 6,
|
125 |
+
'TYPE': 'PPR'
|
126 |
}
|
127 |
|
128 |
def create_user_config_interface():
|
|
|
373 |
rv_type = 'standard'
|
374 |
elif league_settings['TYPE'] == 'Superflex':
|
375 |
rv_type = 'halfPpr'
|
376 |
+
elif league_settings['TYPE'] == 'TE Premium':
|
377 |
+
rv_type = 'halfPpr'
|
378 |
|
379 |
rv_dict = {}
|
380 |
|
|
|
392 |
rv_type = 'standard'
|
393 |
elif league_settings['TYPE'] == 'Superflex':
|
394 |
rv_type = 'halfPpr'
|
395 |
+
elif league_settings['TYPE'] == 'TE Premium':
|
396 |
+
rv_type = 'halfPpr'
|
397 |
|
398 |
vorp_frame = pd.DataFrame()
|
399 |
for positions in ['QB', 'RB', 'WR', 'TE']:
|