File tree Expand file tree Collapse file tree
src/baseball_stats_python Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,6 +32,17 @@ def mlbam_id_example():
3232 print (df )
3333
3434
35+ def spring_training_example ():
36+ df = statcast_search (
37+ season = '2025' ,
38+ start_dt = '2025-02-20' ,
39+ end_dt = '2025-02-20' ,
40+ game_type = 'S' ,
41+ )
42+ print (df )
43+
44+
3545# example()
3646# minor_example()
3747# mlbam_id_example()
48+ # spring_training_example()
Original file line number Diff line number Diff line change 1- __version__ = '0.2.1 '
1+ __version__ = '0.2.2 '
Original file line number Diff line number Diff line change 1+ from ..constants import DEFAULT_SEASON
12from ..enums .minor import Level , MinorGameType
23
3- CURRENT_SEASON = 2024
44START_SEASON = 2021
55
6- ALL_SEASONS = [str (year ) for year in range (START_SEASON , CURRENT_SEASON + 1 )]
6+ # TODO: Remove 2025 once Baseball Savant changes their default season
7+ ALL_SEASONS = [str (year ) for year in range (START_SEASON , 2025 + 1 )]
78
89
910def get_minor_season_param_str (season : str | list [str ]) -> str :
@@ -16,7 +17,7 @@ def get_minor_season_param_str(season: str | list[str]) -> str:
1617 return '|' .join (season )
1718
1819 if season == '' :
19- return str (CURRENT_SEASON )
20+ return str (DEFAULT_SEASON )
2021 if season == 'all' :
2122 return '|' .join (ALL_SEASONS )
2223
Original file line number Diff line number Diff line change 44START_SEASON = 2008
55STATCAST_START_SEASON = 2015
66
7- ALL_SEASONS = [str (year ) for year in range (START_SEASON , DEFAULT_SEASON + 1 )]
8- STATCAST_SEASONS = [
9- str (year ) for year in range (STATCAST_START_SEASON , DEFAULT_SEASON + 1 )
10- ]
7+ # TODO: Remove 2025 once Baseball Savant changes their default season
8+ ALL_SEASONS = [str (year ) for year in range (START_SEASON , 2025 + 1 )]
9+ STATCAST_SEASONS = [str (year ) for year in range (STATCAST_START_SEASON , 2025 + 1 )]
1110
1211
1312def get_season_param_str (season : str | list [str ]) -> str :
You can’t perform that action at this time.
0 commit comments