Jump to content
Brewer Fanatic
Community Moderator
Posted

With how good the AI coding tools have gotten I’ve started to play more with side projects and I’ve always wanted to dabble with baseball data. So I’m curious if anyone on this forum uses python baseball libraries and what their experience has been…

 

A bit of context — I’m not a software engineer but I do a lot of python coding for algorithm R&D in my day job. 

Recommended Posts

Verified Member
Posted
22 minutes ago, nate82 said:

You would get so much hate if you put this on Reddit.

Well, to be hated on Reddit is a good sign you're doing something right.

  • Like 2
Community Moderator
Posted
24 minutes ago, nate82 said:

You would get so much hate if you put this on Reddit.

Pybaseball is really all that you need.  Could also use this api https://github.com/toddrob99/MLB-StatsAPI/issues.

Depends on which subreddit. There are a lot of people like me with a bit of subject area expertise and long lists of side project ideas that previously would have taken too much time/energy to code them up. 

Thanks for the tip -- I was aware of pybaseball but didn't realize it can do statcast also which is awesome! 

Verified Member
Posted
5 hours ago, owbc said:

Depends on which subreddit.

Lately it has been hurrr durrrr AI bad downvote anyone who says otherwise mentality on Reddit. 

Verified Member
Posted
On 4/2/2026 at 6:15 PM, nate82 said:

Lately it has been hurrr durrrr AI bad downvote anyone who says otherwise mentality on Reddit. 

Which seems kinda pointless. It's here to stay and it's only going to grow from here, so whether a person likes it or not is pretty irrelevant. 

  • Like 1
Community Moderator
Posted

image.jpeg.01879bb2d7db19c057cbfabe94a3338c.jpeg

  • WHOA SOLVDD 1

"Rock, sometime, when the team is up against it, and the breaks are beating the boys, tell 'em to go out there with all they got and win just one for the Uecker. I don't know where I'll be then, Rock but I'll know about it; and I'll be happy."

  • 2 weeks later...
Community Moderator
Posted

Here you go, my first vibe coded baseball analysis!

After seeing on reddit that walk rates have significantly increased in 2026, I was curious if shorter players are benefitting more from ABS or not. It seemed like the Brewers also had a preference for short players based on recent personnel decisions, so maybe they were anticipating a benefit from ABS.

It turns out that shorter players do strike out less than taller players, but those trends are consistent across 2025 and 2026. So the answer is no, it appears that players of all heights are both walking more and striking out more. 

Top panel uses the full 2025 season, bottom panel is just through April 15. 

image.png.e6d2279c0ca803a3b998dd4a16108d1b.png

And here's the player height distribution for reference:

image.png.e4e4fdda026b1287f75ae72c734de64e.png

This analysis took me about 30 minutes despite having zero previous knowledge on what baseball player/stat databases look like. The initial vibe-coded analysis was also wrong (I cross-referenced league average BB and K rates online as a sanity check), I had to yell at Copilot to do the binning properly and after that it seems to be correct. 

  • Like 1
The Twins Daily Caretaker Fund
The Brewer Fanatic Caretaker Fund

You all care about this site. The next step is caring for it. We’re asking you to caretake this site so it can remain the premier Brewers community on the internet. Included with caretaking is ad-free browsing of Brewer Fanatic.

×
×
  • Create New...