Update app.py
Browse files
app.py
CHANGED
@@ -49,7 +49,7 @@ gcservice_account = init_conn()
|
|
49 |
NBAGetGameData = 'https://docs.google.com/spreadsheets/d/1tRQrF_I5rS7Q0g9vE8NrENDZ2P3_DvtbBZzKEakwOI0/edit#gid=1373653837'
|
50 |
NBABettingModel = 'https://docs.google.com/spreadsheets/d/1WBnvOHQi_zVTGF63efejK5ho02AY00HiYrMHnMJXY1E/edit#gid=1157978351'
|
51 |
|
52 |
-
game_format = {'
|
53 |
|
54 |
percentages_format = {'Playoff Odds': '{:.2%}', 'Division Odds': '{:.2%}', 'Top 4 Seed Odds': '{:.2%}', '1 Seed Odds': '{:.2%}', 'Win 1st Round': '{:.2%}',
|
55 |
'Win 2nd Round': '{:.2%}', 'Win Conference': '{:.2%}', 'Win Title': '{:.2%}', '1': '{:.2%}', '2': '{:.2%}', '3': '{:.2%}',
|
@@ -121,7 +121,7 @@ with tab1:
|
|
121 |
game_display = just_win_probs[just_win_probs['Acro'].isin(team_var1)]
|
122 |
game_display = game_display[game_display['Date'].isin(date_var1)]
|
123 |
game_display = game_display.set_index('Team Date')
|
124 |
-
st.dataframe(game_display.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(precision=2), use_container_width = True)
|
125 |
st.download_button(
|
126 |
label="Export Game Model",
|
127 |
data=convert_df_to_csv(game_model),
|
@@ -132,7 +132,7 @@ with tab1:
|
|
132 |
game_display = game_model[game_model['Acro'].isin(team_var1)]
|
133 |
game_display = game_display[game_display['Date'].isin(date_var1)]
|
134 |
game_display = game_display.set_index('Team Date')
|
135 |
-
st.dataframe(game_display.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(precision=2), use_container_width = True)
|
136 |
st.download_button(
|
137 |
label="Export Game Model",
|
138 |
data=convert_df_to_csv(game_model),
|
|
|
49 |
NBAGetGameData = 'https://docs.google.com/spreadsheets/d/1tRQrF_I5rS7Q0g9vE8NrENDZ2P3_DvtbBZzKEakwOI0/edit#gid=1373653837'
|
50 |
NBABettingModel = 'https://docs.google.com/spreadsheets/d/1WBnvOHQi_zVTGF63efejK5ho02AY00HiYrMHnMJXY1E/edit#gid=1157978351'
|
51 |
|
52 |
+
game_format = {'Injury and Rotation Adjusted Win %'}
|
53 |
|
54 |
percentages_format = {'Playoff Odds': '{:.2%}', 'Division Odds': '{:.2%}', 'Top 4 Seed Odds': '{:.2%}', '1 Seed Odds': '{:.2%}', 'Win 1st Round': '{:.2%}',
|
55 |
'Win 2nd Round': '{:.2%}', 'Win Conference': '{:.2%}', 'Win Title': '{:.2%}', '1': '{:.2%}', '2': '{:.2%}', '3': '{:.2%}',
|
|
|
121 |
game_display = just_win_probs[just_win_probs['Acro'].isin(team_var1)]
|
122 |
game_display = game_display[game_display['Date'].isin(date_var1)]
|
123 |
game_display = game_display.set_index('Team Date')
|
124 |
+
st.dataframe(game_display.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(game_format, precision=2), use_container_width = True)
|
125 |
st.download_button(
|
126 |
label="Export Game Model",
|
127 |
data=convert_df_to_csv(game_model),
|
|
|
132 |
game_display = game_model[game_model['Acro'].isin(team_var1)]
|
133 |
game_display = game_display[game_display['Date'].isin(date_var1)]
|
134 |
game_display = game_display.set_index('Team Date')
|
135 |
+
st.dataframe(game_display.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(game_format, precision=2), use_container_width = True)
|
136 |
st.download_button(
|
137 |
label="Export Game Model",
|
138 |
data=convert_df_to_csv(game_model),
|