Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -124,7 +124,7 @@ team_dict = df_2023.groupby(['batter_name'])[['batter_id','batter_team']].tail()
|
|
124 |
df_model_2023_group_swing_plus_no['team'] = df_model_2023_group_swing_plus_no['batter_id'].map(team_dict)
|
125 |
df_model_2023_group_swing_plus_no = df_model_2023_group_swing_plus_no.set_index(['batter_id','batter_name','level','team'])
|
126 |
|
127 |
-
df_model_2023_group_swing_plus_no = df_model_2023_group_swing_plus_no[df_model_2023_group_swing_plus_no['pitches']>=
|
128 |
df_model_2023_group_swing_plus_no_copy = df_model_2023_group_swing_plus_no.copy()
|
129 |
import matplotlib
|
130 |
|
@@ -162,7 +162,7 @@ def server(input,output,session):
|
|
162 |
batter_select_id = int(input.batter_id())
|
163 |
# batter_select_name = 'Edouard Julien'
|
164 |
#max(1,int(input.pitch_min()))
|
165 |
-
plot_min = max(
|
166 |
df_model_2023_group_swing_plus_no = df_model_2023_group_swing_plus_no[df_model_2023_group_swing_plus_no.pitches >= plot_min]
|
167 |
## Plot In-Zone vs Out-of-Zone Awareness
|
168 |
sns.set_theme(style="whitegrid", palette="pastel")
|
|
|
124 |
df_model_2023_group_swing_plus_no['team'] = df_model_2023_group_swing_plus_no['batter_id'].map(team_dict)
|
125 |
df_model_2023_group_swing_plus_no = df_model_2023_group_swing_plus_no.set_index(['batter_id','batter_name','level','team'])
|
126 |
|
127 |
+
df_model_2023_group_swing_plus_no = df_model_2023_group_swing_plus_no[df_model_2023_group_swing_plus_no['pitches']>=50]
|
128 |
df_model_2023_group_swing_plus_no_copy = df_model_2023_group_swing_plus_no.copy()
|
129 |
import matplotlib
|
130 |
|
|
|
162 |
batter_select_id = int(input.batter_id())
|
163 |
# batter_select_name = 'Edouard Julien'
|
164 |
#max(1,int(input.pitch_min()))
|
165 |
+
plot_min = max(50,int(input.pitch_min()))
|
166 |
df_model_2023_group_swing_plus_no = df_model_2023_group_swing_plus_no[df_model_2023_group_swing_plus_no.pitches >= plot_min]
|
167 |
## Plot In-Zone vs Out-of-Zone Awareness
|
168 |
sns.set_theme(style="whitegrid", palette="pastel")
|