You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Function to search for WBC Statcast pitch-level data with custom filters based on Baseball Savant's [WBC Statcast Search](https://baseballsavant.mlb.com/statcast-search-world-baseball-classic).
6
+
7
+
**Notification:** If the search range is too wide, the response time will be very long.
8
+
9
+
**WBC data availability**
10
+
11
+
> From Baseball Savant:
12
+
> World Baseball Classic pitch-level Statcast data is available beginning with the 2023 tournament. Bat tracking data will additionally be available beginning with the 2026 tournament.
13
+
14
+
**Examples**
15
+
16
+
```python
17
+
from baseball_stats_python import wbc_statcast_search
| season |`str` or `list[str]`| The season(s) to search for. | Current season |
35
+
| player_type |`str`| Player type for search result. Currently only supports `pitcher` and `batter`. | "pitcher" |
36
+
| game_type |`str` or `WbcGameType` or `list[str or WbcGameType]`| Game type (`F`, `CL`, `CD`, `CW`). Also support `all` to select all options. Can check enum [WbcGameType](../enums/wbc.py)|`R`|
37
+
| pitchers_lookup |`str` or `list[str]`| Pitcher(s)'s mlbam_id. Can get MLBAM ID from Savant's WBC gameday | "" |
38
+
| batters_lookup |`str` or `list[str]`| Batter(s)'s mlbam_id. Can get MLBAM ID from Savant's WBC gameday | "" |
39
+
| debug |`bool`| Whether to print debug information | False |
40
+
41
+
**Use Enums**
42
+
43
+
```python
44
+
from baseball_stats_python.enums.minor import WbcGameType
45
+
46
+
# Get Semi-Finals data
47
+
wbc_statcast_search(
48
+
game_type=WbcGameType.SEMI_FINALS
49
+
)
50
+
51
+
```
52
+
53
+
**Return**
54
+
55
+
A DataFrame with columns can be found from Baseball Savant's [CSV Docs](https://baseballsavant.mlb.com/csv-docs).
56
+
57
+
## `wbc_statcast_pitcher_search`
58
+
59
+
Based on `wbc_statcast_search`, but only returns pitcher data.
60
+
61
+
**Examples**
62
+
63
+
```python
64
+
from baseball_stats_python import wbc_statcast_pitcher_search
65
+
66
+
# Get all pitch data of a specific pitcher
67
+
wbc_statcast_pitcher_search(
68
+
pitchers_lookup="830717"
69
+
)
70
+
```
71
+
72
+
**Arguments**
73
+
74
+
Same with `wbc_statcast_search` but only can use `pitchers_lookup` filter. If `pitchers_lookup` is not provided, it will throw an error.
75
+
76
+
## `wbc_statcast_batter_search`
77
+
78
+
Based on `wbc_statcast_search`, but only returns pitches that target batter faced.
79
+
80
+
**Examples**
81
+
82
+
```python
83
+
from baseball_stats_python import wbc_statcast_batter_search
84
+
85
+
# Get all pitch data of a specific batter
86
+
wbc_statcast_batter_search(
87
+
batters_lookup="838360"
88
+
)
89
+
```
90
+
91
+
**Arguments**
92
+
93
+
Same with `wbc_statcast_batter_search` but only can use `batters_lookup` filter. If `batters_lookup` is not provided, it will throw an error.
0 commit comments