Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -51,12 +51,12 @@ def init_baselines():
|
|
51 |
raw_display = raw_display.apply(pd.to_numeric, errors='ignore')
|
52 |
roo_table = raw_display.sort_values(by='Median', ascending=False)
|
53 |
|
54 |
-
worksheet = sh.worksheet('Positional_Boosts')
|
55 |
-
raw_display = pd.DataFrame(worksheet.get_all_records())
|
56 |
-
raw_display.replace("", 'Welp', inplace=True)
|
57 |
-
raw_display = raw_display.loc[raw_display['teamname'] != 'Welp']
|
58 |
-
raw_display = raw_display.apply(pd.to_numeric, errors='ignore')
|
59 |
-
positional_boosts = raw_display.sort_values(by='Avg_Allowed', ascending=False)
|
60 |
|
61 |
worksheet = sh.worksheet('Overall_Stacks')
|
62 |
raw_display = pd.DataFrame(worksheet.get_all_records())
|
@@ -195,7 +195,7 @@ def init_baselines():
|
|
195 |
raw_display = raw_display.apply(pd.to_numeric, errors='ignore')
|
196 |
lec_bo5 = raw_display.sort_values(by='Kills', ascending=False)
|
197 |
|
198 |
-
return roo_table,
|
199 |
|
200 |
roo_table, positional_boosts, lck_overall_stacks, lck_win_stacks, lck_loss_stacks, lcs_overall_stacks, lcs_win_stacks, lcs_loss_stacks, lec_overall_stacks, lec_win_stacks, lec_loss_stacks, lck_bo1, lck_bo3, lck_bo5, lcs_bo1, lcs_bo3, lcs_bo5, lec_bo1, lec_bo3, lec_bo5 = init_baselines()
|
201 |
|
@@ -209,7 +209,7 @@ with tab1:
|
|
209 |
# Clear values from *all* all in-memory and on-disk data caches:
|
210 |
# i.e. clear values from both square and cube
|
211 |
st.cache_data.clear()
|
212 |
-
roo_table,
|
213 |
league_choice1 = st.radio("What table would you like to display?", ('LCK/LPL', 'LCS', 'LCK'), key='league_var1')
|
214 |
if league_choice1 == 'LCK/LPL':
|
215 |
league_hold = lck_overall_stacks
|
@@ -231,7 +231,7 @@ with tab2:
|
|
231 |
# Clear values from *all* all in-memory and on-disk data caches:
|
232 |
# i.e. clear values from both square and cube
|
233 |
st.cache_data.clear()
|
234 |
-
roo_table,
|
235 |
league_choice2 = st.radio("What table would you like to display?", ('LCK/LPL', 'LCS', 'LCK'), key='league_var2')
|
236 |
if league_choice2 == 'LCK/LPL':
|
237 |
league_hold = roo_table[roo_table['league'] == 'LCK']
|
@@ -268,7 +268,7 @@ with tab3:
|
|
268 |
# Clear values from *all* all in-memory and on-disk data caches:
|
269 |
# i.e. clear values from both square and cube
|
270 |
st.cache_data.clear()
|
271 |
-
roo_table,
|
272 |
league_choice3 = st.radio("What table would you like to display?", ('LCK/LPL', 'LCS', 'LCK'), key='league_var3')
|
273 |
gametype_choice = st.radio("What format are the games being played?", ('Best of 1', 'Best of 3', 'Best of 5'), key='player_stats')
|
274 |
pos_var2 = st.selectbox('View specific position?', options = ['All', 'TOP', 'JNG', 'MID', 'ADC', 'SUP'], key = 'proj_posvar')
|
|
|
51 |
raw_display = raw_display.apply(pd.to_numeric, errors='ignore')
|
52 |
roo_table = raw_display.sort_values(by='Median', ascending=False)
|
53 |
|
54 |
+
# worksheet = sh.worksheet('Positional_Boosts')
|
55 |
+
# raw_display = pd.DataFrame(worksheet.get_all_records())
|
56 |
+
# raw_display.replace("", 'Welp', inplace=True)
|
57 |
+
# raw_display = raw_display.loc[raw_display['teamname'] != 'Welp']
|
58 |
+
# raw_display = raw_display.apply(pd.to_numeric, errors='ignore')
|
59 |
+
# positional_boosts = raw_display.sort_values(by='Avg_Allowed', ascending=False)
|
60 |
|
61 |
worksheet = sh.worksheet('Overall_Stacks')
|
62 |
raw_display = pd.DataFrame(worksheet.get_all_records())
|
|
|
195 |
raw_display = raw_display.apply(pd.to_numeric, errors='ignore')
|
196 |
lec_bo5 = raw_display.sort_values(by='Kills', ascending=False)
|
197 |
|
198 |
+
return roo_table, lck_overall_stacks, lck_win_stacks, lck_loss_stacks, lcs_overall_stacks, lcs_win_stacks, lcs_loss_stacks, lec_overall_stacks, lec_win_stacks, lec_loss_stacks, lck_bo1, lck_bo3, lck_bo5, lcs_bo1, lcs_bo3, lcs_bo5, lec_bo1, lec_bo3, lec_bo5
|
199 |
|
200 |
roo_table, positional_boosts, lck_overall_stacks, lck_win_stacks, lck_loss_stacks, lcs_overall_stacks, lcs_win_stacks, lcs_loss_stacks, lec_overall_stacks, lec_win_stacks, lec_loss_stacks, lck_bo1, lck_bo3, lck_bo5, lcs_bo1, lcs_bo3, lcs_bo5, lec_bo1, lec_bo3, lec_bo5 = init_baselines()
|
201 |
|
|
|
209 |
# Clear values from *all* all in-memory and on-disk data caches:
|
210 |
# i.e. clear values from both square and cube
|
211 |
st.cache_data.clear()
|
212 |
+
roo_table, lck_overall_stacks, lck_win_stacks, lck_loss_stacks, lcs_overall_stacks, lcs_win_stacks, lcs_loss_stacks, lec_overall_stacks, lec_win_stacks, lec_loss_stacks, lck_bo1, lck_bo3, lck_bo5, lcs_bo1, lcs_bo3, lcs_bo5, lec_bo1, lec_bo3, lec_bo5 = init_baselines()
|
213 |
league_choice1 = st.radio("What table would you like to display?", ('LCK/LPL', 'LCS', 'LCK'), key='league_var1')
|
214 |
if league_choice1 == 'LCK/LPL':
|
215 |
league_hold = lck_overall_stacks
|
|
|
231 |
# Clear values from *all* all in-memory and on-disk data caches:
|
232 |
# i.e. clear values from both square and cube
|
233 |
st.cache_data.clear()
|
234 |
+
roo_table, lck_overall_stacks, lck_win_stacks, lck_loss_stacks, lcs_overall_stacks, lcs_win_stacks, lcs_loss_stacks, lec_overall_stacks, lec_win_stacks, lec_loss_stacks, lck_bo1, lck_bo3, lck_bo5, lcs_bo1, lcs_bo3, lcs_bo5, lec_bo1, lec_bo3, lec_bo5 = init_baselines()
|
235 |
league_choice2 = st.radio("What table would you like to display?", ('LCK/LPL', 'LCS', 'LCK'), key='league_var2')
|
236 |
if league_choice2 == 'LCK/LPL':
|
237 |
league_hold = roo_table[roo_table['league'] == 'LCK']
|
|
|
268 |
# Clear values from *all* all in-memory and on-disk data caches:
|
269 |
# i.e. clear values from both square and cube
|
270 |
st.cache_data.clear()
|
271 |
+
roo_table, lck_overall_stacks, lck_win_stacks, lck_loss_stacks, lcs_overall_stacks, lcs_win_stacks, lcs_loss_stacks, lec_overall_stacks, lec_win_stacks, lec_loss_stacks, lck_bo1, lck_bo3, lck_bo5, lcs_bo1, lcs_bo3, lcs_bo5, lec_bo1, lec_bo3, lec_bo5 = init_baselines()
|
272 |
league_choice3 = st.radio("What table would you like to display?", ('LCK/LPL', 'LCS', 'LCK'), key='league_var3')
|
273 |
gametype_choice = st.radio("What format are the games being played?", ('Best of 1', 'Best of 3', 'Best of 5'), key='player_stats')
|
274 |
pos_var2 = st.selectbox('View specific position?', options = ['All', 'TOP', 'JNG', 'MID', 'ADC', 'SUP'], key = 'proj_posvar')
|