

Show HN: Twitter bot that tweets bad ball and strike calls in MLB baseball games - chaddeshon

@MajorLeagueUmp or @[TeamNickname]Ump<p>You&#x27;re watching a baseball game. The pitcher throws a pitch right down the middle of the plate, but the umpire calls it a ball. Was it really a bad call or did you just have a bad angle.<p>@MajorLeagueUmp or @[TeamNickname]Ump tweets bad ball and strike calls in realtime and includes:<p><pre><code>  - A picture of the pitch location
  - Percentage of the time a pitch in that location is called a strike
  - How far the pitch was from the edge of the *real life* strike zone
</code></pre>
On TV, FoxTrax will show you where the pitch went relative to the rulebook strike zone, but it won&#x27;t tell you if pitches in that location are typically called strikes. I found this frustrating because any baseball fan knows that the real strike zone is different than the rule book zone.<p>To find the actual zone I:<p><pre><code>  1. Downloaded Pitch F&#x2F;X data from the last four years.
  2. Built a fine-grain heat-map of called-strike percentages.
  3. Applied some gaussian filters.
  4. Converted the heat-map into perimeters
    (inside this line it is a strike 78% of the time, etc).
    Polar coordinates finally turned out to be good for something.
</code></pre>
The tweets are updated by:<p><pre><code>  1. Nodejs server on heroku that monitors Pitch F&#x2F;X data in real-time.
  2. Each pitch is stored in Firebase.
  3. Compare the pitches to the actual zone from above.
  4. If the call was really bad, generate an SVG and tweet.
</code></pre>
I&#x27;ve been researching the strike zone on and off for the last 5 years. At first, I wanted to answer two questions.<p><pre><code>  1. Where are balls and strikes actually called?
  2. How consistent are umpires in making those calls?
</code></pre>
Some quick answers:<p><pre><code>  1. They widen the plate a tad.
  2. They really round off the corners.
     The strike zone is closer to a circle than a square.
  3. Left handed hitters face a much larger strike zone
     that extends well off the outside of the plate.
  4. They are actually pretty consistent, but not perfect.</code></pre>
======
chaddeshon
Clickable:

[https://twitter.com/MajorLeagueUmp](https://twitter.com/MajorLeagueUmp)

[https://twitter.com/RedSoxUmp](https://twitter.com/RedSoxUmp)

[https://twitter.com/YankeesUmp](https://twitter.com/YankeesUmp)

[https://twitter.com/DiamondbacksUmp](https://twitter.com/DiamondbacksUmp)

[https://twitter.com/BravesUmp](https://twitter.com/BravesUmp)

[https://twitter.com/OriolesUmp](https://twitter.com/OriolesUmp)

[https://twitter.com/CubsUmp](https://twitter.com/CubsUmp)

[https://twitter.com/WhiteSoxUmp](https://twitter.com/WhiteSoxUmp)

[https://twitter.com/RedsUmp](https://twitter.com/RedsUmp)

[https://twitter.com/IndiansUmp](https://twitter.com/IndiansUmp)

[https://twitter.com/RockiesUmp](https://twitter.com/RockiesUmp)

[https://twitter.com/TigersUmp](https://twitter.com/TigersUmp)

[https://twitter.com/MarlinsUmp](https://twitter.com/MarlinsUmp)

[https://twitter.com/AstrosUmp](https://twitter.com/AstrosUmp)

[https://twitter.com/RoyalsUmp](https://twitter.com/RoyalsUmp)

[https://twitter.com/AngelsUmp](https://twitter.com/AngelsUmp)

[https://twitter.com/DodgersUmp](https://twitter.com/DodgersUmp)

[https://twitter.com/BrewersUmp](https://twitter.com/BrewersUmp)

[https://twitter.com/TwinsUmp](https://twitter.com/TwinsUmp)

[https://twitter.com/MetsUmp](https://twitter.com/MetsUmp)

[https://twitter.com/AthleticsUmp](https://twitter.com/AthleticsUmp)

[https://twitter.com/PhilliesUmp](https://twitter.com/PhilliesUmp)

[https://twitter.com/PiratesUmp](https://twitter.com/PiratesUmp)

[https://twitter.com/PadresUmp](https://twitter.com/PadresUmp)

[https://twitter.com/GiantsUmp](https://twitter.com/GiantsUmp)

[https://twitter.com/MarinersUmp](https://twitter.com/MarinersUmp)

[https://twitter.com/CardinalsUmp](https://twitter.com/CardinalsUmp)

[https://twitter.com/RaysUmp](https://twitter.com/RaysUmp)

[https://twitter.com/RangersUmp](https://twitter.com/RangersUmp)

[https://twitter.com/BlueJaysUmp](https://twitter.com/BlueJaysUmp)

[https://twitter.com/NationalsUmp](https://twitter.com/NationalsUmp)

------
mjhea0
Do you have a github repo for these?

~~~
chaddeshon
No. I'll have to consider that.

------
tvhiggins
is the 3-d strike zone incorporated into these calculations? i know the strike
zone has width, in addition to length,height. so when you say the strike zone
is more of a circle, i would contend it's a horizontal cylinder.

