baseballr icon indicating copy to clipboard operation
baseballr copied to clipboard

Splits!

Open ilikesports2 opened this issue 7 years ago • 3 comments

Hey Bill,

Just discovered this package, truly awesome stuff. Curious if there's any way (or if it's possible to add?) to query batter and pitcher splits vs righties and lefties?

Thanks!

ilikesports2 avatar Jan 03 '19 03:01 ilikesports2

Query what, exactly? Do you mean the FanGraphs' leaderboards or are you looking to restrict the Statcast queries up front by platoon splits?

BillPetti avatar Mar 09 '19 13:03 BillPetti

Fangraphs leaderboards, if it's possible

ilikesports2 avatar Mar 13 '19 17:03 ilikesports2

Second this suggestion!

I am able to pull back data by position (33-40) and handedness (1 or 2) into an html `#C= 33 #1B= 34 #2B= 35 #3B= 36 #SS= 37 #LF= 38 #CF= 39 #RF= 40

Catchers vs. RHP

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

Catchers vs. LHP

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

But I can't parse the html to get it into a df. Any help would be appreciated!!

danielmcintosh1 avatar Sep 04 '21 19:09 danielmcintosh1