kruser / atbat-mongodb

A Perl project that pulls data from MLB's AtBat servers and shoves them into a local MongoDB
Other
33 stars 11 forks source link

Store current ball and strike count on each pitch #5

Open kruser opened 10 years ago

kruser commented 10 years ago

On PitchFX.org I'd like to search for pitches depending on the balls and strikes, but we don't have that data stored with this project.

This issue is to add 'b' and 's' properties to the pitch objects.

kruser commented 10 years ago

Let's also add boolean/bit indicators for...

^ both of those being from a batter's perspective.

kruser commented 10 years ago

And another boolean/bit

albertlyu commented 10 years ago

Would it be burdensome to add both, then decide later? I believe most PITCHf/x analysts will use the batter height instead of strike zone px.

To further motivate this issue, we could start thinking about Scout Assist tools once complete. There are no good pitch sequencing apps publicly available, though I did find this one, which seems somewhat antiquated given the UI/UX.

https://www.linkedin.com/company/at-bat-stats?_mSplash=1

albertlyu commented 10 years ago

Also, for behind in the count, it may not make sense to include 3-2 counts. Also I forget if 1-1 counts are considered ahead in the count or not - both of these counts should be researched a bit - I'd check Baseball-Reference's definition and go with that.

kruser commented 10 years ago

That atbat tree page is interesting. It was more on batter results for a given count. I think I'm more interested in pitcher/battery behavior though.

For your first question, I'm already adding batter height to the DB. I was more curious if you think a boolean like inZone should take batter height into consideration.

albertlyu commented 10 years ago

Quick Google search tells me that 3-2 counts are 'ahead in the count' for batters, and 1-1 counts are not 'behind in the count' for batters. In other words, 'ahead in the count' for batters should include 1-0, 2-0, 3-0, 2-1 or 3-1 counts. 'Behind in the count' for batters should include 0-1, 0-2, and 1-2 counts. The inZone boolean should use batter height, at least to go along with industry standards based on a conversation on Twitter: https://twitter.com/harrypav/status/457552977864052736