pybaseball
pybaseball copied to clipboard
Pull current and historical baseball statistics using Python (Statcast, Baseball Reference, FanGraphs)
This PR addresses #343 by applying the fix suggested in the issue, and adds in a test to verify that it is working.
Any way to have something like team_pitching_range and team_batting_range like there is for pitching_stats_range. I need to generate game-by-game aggregate historical team stats to feed some machine learning. Or do...
This change addresses #293 by adding in `start_date` and `end_date` querying options to the Fangraphs functions. I didn't change any existing functionality in the Fangraphs function, but did make a...
Is it possible to add a condition to have the pitching_stats_range and batting_stats_range to pull stats from Fangraphs instead of Baseball Reference? Speaking specifically to pitching stats - for some...
Apply fix via def postprocess(data: pd.DataFrame) -> pd.DataFrame: data.drop("Rk", axis=1, inplace=True) # drop index column repl_dict = { "Gtm": "Game", "Unnamed: 3": "Home", "#": "NumPlayers", "Opp. Starter (GmeSc)": "OppStart", "Pitchers...
- This PR adds a function, related tests and documentation for capturing team-level "batting against" stats from Baseball-Reference. - The page this function scrapes includes both team-level and player-level tables,...
Timing failing regularly, lately it's been taking ~33 seconds. Figured I'd add a 5 sec buffer from that 33 so set to 38.
Introduces a function and related tests and documentation that captures player projection data from Fangraphs. Provides argument options to specify the projection source, position, league and team. Extends the teamid...
Suppose I wanted players that only played in either the AL or NL? Is there a way to do that? Including situations where a player played for multiple teams?
I added a function that calculates vertical approach angle using the formula from this [fangraphs article](https://blogs.fangraphs.com/a-visualized-primer-on-vertical-approach-angle-vaa/) to statcast_utils.py.