jldbc / pybaseball

Pull current and historical baseball statistics using Python (Statcast, Baseball Reference, FanGraphs)
MIT License
1.26k stars 333 forks source link

Fangraphs Data Pull Request #240

Open david1111039243 opened 2 years ago

david1111039243 commented 2 years ago

Hello, Is there a way to request a fangraph split stats as a pybaseball module? Based on my understanding of the code, the fangraph functions batting_stats and pitching_stats only apply to 'standard' batting and fielding data. Can this be created for the datapoints reflected in this output

https://www.fangraphs.com/leaders/splits-leaderboards?splitArr=&splitArrPitch=&position=P&autoPt=true&splitTeams=false&statType=player&statgroup=1&startDate=2021-03-01&endDate=2021-11-01&players=&filter=&groupBy=season&sort=-1,1

I also could not find the code referenced from the 'pitching_stats' method, only the doc. Is there a way to view the underlying code? I could try to create something comparable to scrape from Fangraphs - although it will likely take a bit of trial and error! Heavy on the latter part!