Spaces:
Sleeping
Sleeping
James McCool
commited on
Commit
·
0608368
1
Parent(s):
178e748
Refactor salary mapping logic in app.py to differentiate between NFL and NBA players for DraftKings and FanDuel. Updated the salary calculation to apply a specific divisor for NFL while maintaining the original mapping for NBA, enhancing the accuracy of player salary projections based on sport selection.
Browse files
app.py
CHANGED
@@ -560,9 +560,12 @@ with tab1:
|
|
560 |
flex_working['Freq'] = flex_working['Freq'].astype(int)
|
561 |
flex_working['Position'] = flex_working['Player'].map(maps_dict['Pos_map'])
|
562 |
if sim_site_var1 == 'Draftkings':
|
563 |
-
|
|
|
|
|
|
|
564 |
elif sim_site_var1 == 'Fanduel':
|
565 |
-
|
566 |
flex_working['Proj Own'] = (flex_working['Player'].map(maps_dict['Own_map']) / 100) - (flex_working['Player'].map(maps_dict['cpt_Own_map']) / 100)
|
567 |
flex_working['Exposure'] = flex_working['Freq']/(1000)
|
568 |
flex_working['Edge'] = flex_working['Exposure'] - flex_working['Proj Own']
|
|
|
560 |
flex_working['Freq'] = flex_working['Freq'].astype(int)
|
561 |
flex_working['Position'] = flex_working['Player'].map(maps_dict['Pos_map'])
|
562 |
if sim_site_var1 == 'Draftkings':
|
563 |
+
if sim_sport_var1 == 'NFL':
|
564 |
+
freq_working['Salary'] = freq_working['Player'].map(maps_dict['Salary_map']) / 1.5
|
565 |
+
elif sim_sport_var1 == 'NBA':
|
566 |
+
freq_working['Salary'] = freq_working['Player'].map(maps_dict['Salary_map'])
|
567 |
elif sim_site_var1 == 'Fanduel':
|
568 |
+
freq_working['Salary'] = freq_working['Player'].map(maps_dict['Salary_map'])
|
569 |
flex_working['Proj Own'] = (flex_working['Player'].map(maps_dict['Own_map']) / 100) - (flex_working['Player'].map(maps_dict['cpt_Own_map']) / 100)
|
570 |
flex_working['Exposure'] = flex_working['Freq']/(1000)
|
571 |
flex_working['Edge'] = flex_working['Exposure'] - flex_working['Proj Own']
|