nesticot commited on
Commit
2bde935
·
verified ·
1 Parent(s): 57f53bc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -316,7 +316,7 @@ def server(input, output, session):
316
 
317
  df_plot = df_plot[df_plot['batter_hand'].isin(split_dict_hand[input.split_id()])]
318
 
319
- df_plot = df_plot.sort_values(by=['start_time'])
320
 
321
  if input.count_id_balls()=='greater' and input.count_id_strikes()=='greater' and int(input.ball_id())==0 and int(input.strike_id())==0:
322
  ball_title = ''
@@ -364,6 +364,7 @@ def server(input, output, session):
364
  df_plot['pitch_type_count_each'] = df_plot.groupby(['pitch_type'])['pitch_type'].cumcount()+1
365
  #df_plot = df_plot.merge(df_2024_update[['tj_stuff_plus','play_id']],left_on=['play_id'],right_on=['play_id'],how='left')
366
  df_plot = df_plot.sort_values(by=['pitch_description'])
 
367
 
368
  grouped_ivb = psf.group_ivb_update(df=df_plot,agg_list=['pitcher_id','pitcher_name','pitcher_hand','pitch_type','pitch_description'])
369
  grouped_ivb_all = psf.group_ivb_update(df=df_plot,agg_list=['pitcher_id','pitcher_name','pitcher_hand'])
@@ -621,6 +622,7 @@ def server(input, output, session):
621
  df_plot['pitch_type_count_each'] = df_plot.groupby(['pitch_type'])['pitch_type'].cumcount()+1
622
  #df_plot = df_plot.merge(df_2024_update[['tj_stuff_plus','play_id']],left_on=['play_id'],right_on=['play_id'],how='left')
623
  df_plot = df_plot.sort_values(by=['pitch_description'])
 
624
 
625
  # ax0.text(x=0.5,y=0.30,s=f'2024 Spring Training',fontname='Calibri',ha='center',fontsize=30,va='top')
626
  df_plot['game_opp'] = df_plot['game_date'].astype(str) + ' vs ' + df_plot['batter_team'].astype(str)
 
316
 
317
  df_plot = df_plot[df_plot['batter_hand'].isin(split_dict_hand[input.split_id()])]
318
 
319
+
320
 
321
  if input.count_id_balls()=='greater' and input.count_id_strikes()=='greater' and int(input.ball_id())==0 and int(input.strike_id())==0:
322
  ball_title = ''
 
364
  df_plot['pitch_type_count_each'] = df_plot.groupby(['pitch_type'])['pitch_type'].cumcount()+1
365
  #df_plot = df_plot.merge(df_2024_update[['tj_stuff_plus','play_id']],left_on=['play_id'],right_on=['play_id'],how='left')
366
  df_plot = df_plot.sort_values(by=['pitch_description'])
367
+ df_plot = df_plot.sort_values(by=['start_time'])
368
 
369
  grouped_ivb = psf.group_ivb_update(df=df_plot,agg_list=['pitcher_id','pitcher_name','pitcher_hand','pitch_type','pitch_description'])
370
  grouped_ivb_all = psf.group_ivb_update(df=df_plot,agg_list=['pitcher_id','pitcher_name','pitcher_hand'])
 
622
  df_plot['pitch_type_count_each'] = df_plot.groupby(['pitch_type'])['pitch_type'].cumcount()+1
623
  #df_plot = df_plot.merge(df_2024_update[['tj_stuff_plus','play_id']],left_on=['play_id'],right_on=['play_id'],how='left')
624
  df_plot = df_plot.sort_values(by=['pitch_description'])
625
+ df_plot = df_plot.sort_values(by=['start_time'])
626
 
627
  # ax0.text(x=0.5,y=0.30,s=f'2024 Spring Training',fontname='Calibri',ha='center',fontsize=30,va='top')
628
  df_plot['game_opp'] = df_plot['game_date'].astype(str) + ' vs ' + df_plot['batter_team'].astype(str)