Update app.py
Browse files
app.py
CHANGED
@@ -17,7 +17,7 @@ colour_palette = ['#FFB000','#648FFF','#785EF0',
|
|
17 |
import datasets
|
18 |
from datasets import load_dataset
|
19 |
### Import Datasets
|
20 |
-
dataset = load_dataset('nesticot/mlb_data', data_files=['
|
21 |
dataset_train = dataset['train']
|
22 |
df_2024 = dataset_train.to_pandas().set_index(list(dataset_train.features.keys())[0]).reset_index(drop=True).drop_duplicates(subset=['play_id'],keep='last')
|
23 |
|
@@ -515,7 +515,7 @@ def server(input, output, session):
|
|
515 |
|
516 |
|
517 |
ax0.text(x=0.5,y=0.8,s=title_spot,fontname='Calibri',ha='center',fontsize=56,va='top')
|
518 |
-
ax0.text(x=0.5,y=0.35,s='
|
519 |
|
520 |
player_bio = requests.get(url=f"https://statsapi.mlb.com/api/v1/people?personIds={pitcher_id_select}&hydrate=currentTeam").json()
|
521 |
#ax0.text(x=0.5,y=0.05,s=f'{ball_title}{strike_title}{split_title}',fontname='Calibri',ha='center',fontsize=20,va='top')
|
@@ -818,7 +818,7 @@ def server(input, output, session):
|
|
818 |
|
819 |
|
820 |
ax0.text(x=0.5,y=0.8,s=title_spot,fontname='Calibri',ha='center',fontsize=56,va='top')
|
821 |
-
ax0.text(x=0.5,y=0.35,s='
|
822 |
|
823 |
|
824 |
#ax0.text(x=0.5,y=0.25,s=f'2024 Spring Training',fontname='Calibri',ha='center',fontsize=30,va='top')
|
|
|
17 |
import datasets
|
18 |
from datasets import load_dataset
|
19 |
### Import Datasets
|
20 |
+
dataset = load_dataset('nesticot/mlb_data', data_files=['a_pitch_data_2024.csv' ])
|
21 |
dataset_train = dataset['train']
|
22 |
df_2024 = dataset_train.to_pandas().set_index(list(dataset_train.features.keys())[0]).reset_index(drop=True).drop_duplicates(subset=['play_id'],keep='last')
|
23 |
|
|
|
515 |
|
516 |
|
517 |
ax0.text(x=0.5,y=0.8,s=title_spot,fontname='Calibri',ha='center',fontsize=56,va='top')
|
518 |
+
ax0.text(x=0.5,y=0.35,s='A Season Pitching Summary',fontname='Calibri',ha='center',fontsize=40,va='top',fontstyle='italic')
|
519 |
|
520 |
player_bio = requests.get(url=f"https://statsapi.mlb.com/api/v1/people?personIds={pitcher_id_select}&hydrate=currentTeam").json()
|
521 |
#ax0.text(x=0.5,y=0.05,s=f'{ball_title}{strike_title}{split_title}',fontname='Calibri',ha='center',fontsize=20,va='top')
|
|
|
818 |
|
819 |
|
820 |
ax0.text(x=0.5,y=0.8,s=title_spot,fontname='Calibri',ha='center',fontsize=56,va='top')
|
821 |
+
ax0.text(x=0.5,y=0.35,s='A Game Pitching Summary',fontname='Calibri',ha='center',fontsize=40,va='top',fontstyle='italic')
|
822 |
|
823 |
|
824 |
#ax0.text(x=0.5,y=0.25,s=f'2024 Spring Training',fontname='Calibri',ha='center',fontsize=30,va='top')
|