-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathexample.py
More file actions
57 lines (44 loc) · 1.15 KB
/
example.py
File metadata and controls
57 lines (44 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
"""Example usage of the baseball_stats_python package."""
from src.baseball_stats_python import (
minor_statcast_search,
mlbam_id_search,
statcast_search,
wbc_statcast_search,
)
from src.baseball_stats_python.enums.minor import MinorGameType
from src.baseball_stats_python.enums.statcast import GameType, MlbTeam, Month
def example():
df = statcast_search(
season="2023",
pitchers_lookup="477132",
game_type=[GameType.PLAYOFFS, "R"],
opponent=MlbTeam.PADRES,
month=Month.JUNE,
)
print(df)
def minor_example():
df = minor_statcast_search(
season="2023", game_type=MinorGameType.REGULAR_SEASON, pitchers_lookup="678906"
)
print(df)
def mlbam_id_example():
df = mlbam_id_search("Lin")
print(df)
def spring_training_example():
df = statcast_search(
season="2025",
start_dt="2025-02-20",
end_dt="2025-02-20",
game_type="S",
)
print(df)
def wbc_example():
df = wbc_statcast_search(
batters_lookup="838360",
)
print(df)
# example()
# minor_example()
# mlbam_id_example()
# spring_training_example()
# wbc_example()