Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -77,7 +77,7 @@ prop_table_options = ['NFL_GAME_PLAYER_RUSHING_YARDS', 'NFL_GAME_PLAYER_RECEIVIN
|
|
77 |
prop_format = {'L3 Success': '{:.2%}', 'L6_Success': '{:.2%}', 'L10_success': '{:.2%}', 'Trending Over': '{:.2%}', 'Trending Under': '{:.2%}',
|
78 |
'Implied Over': '{:.2%}', 'Implied Under': '{:.2%}', 'Over Edge': '{:.2%}', 'Under Edge': '{:.2%}'}
|
79 |
all_sim_vars = ['NFL_GAME_PLAYER_PASSING_YARDS', 'NFL_GAME_PLAYER_RUSHING_YARDS', 'NFL_GAME_PLAYER_RECEIVING_YARDS', 'NFL_GAME_PLAYER_RECEIVING_RECEPTIONS', 'NFL_GAME_PLAYER_RUSHING_ATTEMPTS', 'NFL_GAME_PLAYER_PASSING_ATTEMPTS']
|
80 |
-
sim_all_hold = pd.DataFrame(columns=['Player', 'Team', 'Prop', 'Mean_Outcome', 'Imp Over', 'Over%', 'Imp Under', 'Under%', 'Bet?', 'Edge'])
|
81 |
|
82 |
tab1, tab2, tab3, tab4, tab5, tab6 = st.tabs(["Game Betting Model", "QB Projections", "RB/WR/TE Projections", "Player Prop Trends", "Player Prop Simulations", "Stat Specific Simulations"])
|
83 |
|
@@ -389,7 +389,7 @@ with tab6:
|
|
389 |
for books in ['FANDUEL', 'DRAFTKINGS', 'BET365', 'CONSENSUS']:
|
390 |
prop_df = prop_df_raw.loc[prop_df_raw['book'] == books]
|
391 |
prop_df = prop_df.loc[prop_df['prop_type'] == prop]
|
392 |
-
prop_df = prop_df[~((prop_df['over_prop'] <
|
393 |
prop_df = prop_df[['Player', 'book', 'over_prop', 'over_line', 'under_line']]
|
394 |
prop_df.rename(columns={"over_prop": "Prop"}, inplace = True)
|
395 |
prop_df = prop_df.loc[prop_df['Prop'] != 0]
|
@@ -472,7 +472,7 @@ with tab6:
|
|
472 |
players_only['Player'] = hold_file[['Player']]
|
473 |
players_only['Team'] = players_only['Player'].map(team_dict)
|
474 |
|
475 |
-
leg_outcomes = players_only[['Player', 'Team', 'Book', 'Prop
|
476 |
sim_all_hold = pd.concat([sim_all_hold, leg_outcomes], ignore_index=True)
|
477 |
|
478 |
final_outcomes = sim_all_hold
|
@@ -499,7 +499,7 @@ with tab6:
|
|
499 |
df = pd.merge(overall_stats, prop_df, how='left', left_on=['Player'], right_on = ['Player'])
|
500 |
elif prop_type_var == "rush_yards":
|
501 |
prop_df = prop_df.loc[prop_df['prop_type'] == 'NFL_GAME_PLAYER_RUSHING_YARDS']
|
502 |
-
prop_df = prop_df[~((prop_df['over_prop'] <
|
503 |
prop_df = prop_df[['Player', 'book', 'over_prop', 'over_line', 'under_line']]
|
504 |
prop_df.rename(columns={"over_prop": "Prop"}, inplace = True)
|
505 |
prop_df = prop_df.loc[prop_df['Prop'] != 0]
|
@@ -622,11 +622,12 @@ with tab6:
|
|
622 |
players_only['Bet_suggest'] = np.where(players_only['Over_diff'] > players_only['Under_diff'], "Over" , "Under")
|
623 |
players_only['Bet?'] = np.where(players_only['Bet_check'] >= players_only['prop_threshold'], players_only['Bet_suggest'], "No Bet")
|
624 |
players_only['Edge'] = players_only['Bet_check']
|
|
|
625 |
|
626 |
players_only['Player'] = hold_file[['Player']]
|
627 |
players_only['Team'] = players_only['Player'].map(team_dict)
|
628 |
|
629 |
-
leg_outcomes = players_only[['Player', 'Team', 'Book', 'Prop', 'Mean_Outcome', 'Imp Over', 'Over%', 'Imp Under', 'Under%', 'Bet?', 'Edge']]
|
630 |
sim_all_hold = pd.concat([sim_all_hold, leg_outcomes], ignore_index=True)
|
631 |
|
632 |
final_outcomes = sim_all_hold
|
|
|
77 |
prop_format = {'L3 Success': '{:.2%}', 'L6_Success': '{:.2%}', 'L10_success': '{:.2%}', 'Trending Over': '{:.2%}', 'Trending Under': '{:.2%}',
|
78 |
'Implied Over': '{:.2%}', 'Implied Under': '{:.2%}', 'Over Edge': '{:.2%}', 'Under Edge': '{:.2%}'}
|
79 |
all_sim_vars = ['NFL_GAME_PLAYER_PASSING_YARDS', 'NFL_GAME_PLAYER_RUSHING_YARDS', 'NFL_GAME_PLAYER_RECEIVING_YARDS', 'NFL_GAME_PLAYER_RECEIVING_RECEPTIONS', 'NFL_GAME_PLAYER_RUSHING_ATTEMPTS', 'NFL_GAME_PLAYER_PASSING_ATTEMPTS']
|
80 |
+
sim_all_hold = pd.DataFrame(columns=['Player', 'Team', 'Book', 'Prop Type', 'Prop', 'Mean_Outcome', 'Imp Over', 'Over%', 'Imp Under', 'Under%', 'Bet?', 'Edge'])
|
81 |
|
82 |
tab1, tab2, tab3, tab4, tab5, tab6 = st.tabs(["Game Betting Model", "QB Projections", "RB/WR/TE Projections", "Player Prop Trends", "Player Prop Simulations", "Stat Specific Simulations"])
|
83 |
|
|
|
389 |
for books in ['FANDUEL', 'DRAFTKINGS', 'BET365', 'CONSENSUS']:
|
390 |
prop_df = prop_df_raw.loc[prop_df_raw['book'] == books]
|
391 |
prop_df = prop_df.loc[prop_df['prop_type'] == prop]
|
392 |
+
prop_df = prop_df[~((prop_df['over_prop'] < 15) & (prop_df['prop_type'] == 'NFL_GAME_PLAYER_RUSHING_YARDS'))]
|
393 |
prop_df = prop_df[['Player', 'book', 'over_prop', 'over_line', 'under_line']]
|
394 |
prop_df.rename(columns={"over_prop": "Prop"}, inplace = True)
|
395 |
prop_df = prop_df.loc[prop_df['Prop'] != 0]
|
|
|
472 |
players_only['Player'] = hold_file[['Player']]
|
473 |
players_only['Team'] = players_only['Player'].map(team_dict)
|
474 |
|
475 |
+
leg_outcomes = players_only[['Player', 'Team', 'Book', 'Prop Type', 'Prop', 'Mean_Outcome', 'Imp Over', 'Over%', 'Imp Under', 'Under%', 'Bet?', 'Edge']]
|
476 |
sim_all_hold = pd.concat([sim_all_hold, leg_outcomes], ignore_index=True)
|
477 |
|
478 |
final_outcomes = sim_all_hold
|
|
|
499 |
df = pd.merge(overall_stats, prop_df, how='left', left_on=['Player'], right_on = ['Player'])
|
500 |
elif prop_type_var == "rush_yards":
|
501 |
prop_df = prop_df.loc[prop_df['prop_type'] == 'NFL_GAME_PLAYER_RUSHING_YARDS']
|
502 |
+
prop_df = prop_df[~((prop_df['over_prop'] < 15) & (prop_df['prop_type'] == 'NFL_GAME_PLAYER_RUSHING_YARDS'))]
|
503 |
prop_df = prop_df[['Player', 'book', 'over_prop', 'over_line', 'under_line']]
|
504 |
prop_df.rename(columns={"over_prop": "Prop"}, inplace = True)
|
505 |
prop_df = prop_df.loc[prop_df['Prop'] != 0]
|
|
|
622 |
players_only['Bet_suggest'] = np.where(players_only['Over_diff'] > players_only['Under_diff'], "Over" , "Under")
|
623 |
players_only['Bet?'] = np.where(players_only['Bet_check'] >= players_only['prop_threshold'], players_only['Bet_suggest'], "No Bet")
|
624 |
players_only['Edge'] = players_only['Bet_check']
|
625 |
+
players_only['Prop type'] = prop
|
626 |
|
627 |
players_only['Player'] = hold_file[['Player']]
|
628 |
players_only['Team'] = players_only['Player'].map(team_dict)
|
629 |
|
630 |
+
leg_outcomes = players_only[['Player', 'Team', 'Book', 'Prop Type', 'Prop', 'Mean_Outcome', 'Imp Over', 'Over%', 'Imp Under', 'Under%', 'Bet?', 'Edge']]
|
631 |
sim_all_hold = pd.concat([sim_all_hold, leg_outcomes], ignore_index=True)
|
632 |
|
633 |
final_outcomes = sim_all_hold
|