MN Wild Zone Entries/Exits for October 9th, 2014

Over the course of the 2014-15 season I plan on tracking the zone entries and exits for the Minnesota Wild and see if there is any useful/interesting information there. I will also be making this data available to the general public for use.

One interesting thing about the first game versus the Avalanche is that the Wild had 58 carry-ins to 37 dump-ins while the Avs had 28 carry-ins to 41 dump-ins. Since carrying the puck in has been found to be more effective, it’s good to see the Wild’s Carry-in Zone Entry % of 62% versus the Avs’ 41%. That’s in all situations and only one game, so it’s too small of a sample to draw any larger conclusions, but if this is sign that the Wild have adjusted to a more… statistically sensible style of play, it could bode well for the Wild.

The first of these data sets are now available:


Previous games and other files will be available on the MN Wild Stats Project page of this site.


Dominant Twins Batters from 1961-Present

I wrote a brief post examining the dominant Minnesota Twins hitters from 1961 to today over at Twins Daily.

UPDATE: Twins Daily was recently updated to a new CMS which seems to have lost the actual image for the article. I’m reproducing the original article here.

With the All-Star Game just around the corner, it’s a perfect time to look at some of the best batters throughout Twins history and see how their paths crossed over time. While having a great collection of hitters is one part of a playoff caliber team, the following chart shows that it is a necessary, but not sufficient criteria.

Looking at WAR over time (in this case, from is a good way to get a general sense of the quality of batters over time as it is adjusted for era and playing environment.

(Click here to see the chart much bigger.)

A few interesting things jump out from looking at this chart:

  • The “lean years” of Twins wins (mid-70s to mid-80s, mid-90s to early-00s) were also lean years for impact bats. But also notable is that some of the best years for Twins individual batters (Carew and Knoblauch, specifically) came during those “lean years”.
  • Harmon Killebrew’s career stands out for both its longevity and consistency. Every Twin fan knows that “Killer” was a great player, but placed against the other great hitters of Twins history, it becomes even more obvious.
  • The late-70s to early-80s were not quite the wasteland for Twins that the chart shows. While the only “dominant” player (picked by an arbitrary cut-off) was Roy Smalley, there were actually a number of other great years in there by Tom Brunansky (1982 being a standout for him at 5.6 WAR, but 1983 and 1984 were also good years with WAR of ~3 each), Hrbek (from 1982 forward), Butch Wynegar (’76, ’77, ’79), and even Rob Wilfong (3.1 WAR in 1979).
  • Rod Carew was really good.

Charts like this are fun because they are really just invitations to do deeper research and look below the surface metrics. Besides the obvious things (e.g. the dominant players of the 60s and the World Series years of the 80s and 90s), there are also the blank spots that beg to be filled in (e.g. what was going on in the late 70s?).

For the next installment of this series, I plan to take a look at the dominant Twins pitchers since the franchise was moved to Minnesota.


  • The idea for this post came from a recent XKCD comic title “Dominant Players over Time“.
  • Data is from, both the Play Index and individual player pages for WAR.
  • Players were selected for having approximately 20 WAR over their career with the Twins. Ultimately, the value went down to about 17.2 to include Mack, Gagne, Battey, and Span.

Normalizing PITCHf/x Release Point Data

PITCHf/x release points are generally recorded at 50 feet. I say generally, because in the early years (2007-2009) they varied from 40-55 feet while they were trying to determine the best location. In late 2010, Mike Fast published an article arguing that 55 feet is more representative of true pitcher release points (every pitcher is a bit different in reality). Since then, it has become standard practice to renormalize all pitches to 55 feet to make analysis more consistent. The procedure to do this, while alluded to by Alan Nathan, is never really spelled out explicitly. That is what I aim to do here.

The procedure is fairly straightforward (and hence probably why it isn’t normally shown). The equations for the position of the ball at time t are (remember high school physics?):

x(t) = x_0 + v_{x0} t + \frac{1}{2}a_x t^2 \\
y(t) = y_0 + v_{y0} t + \frac{1}{2}a_y t^2 \\
z(t) = z_0 + v_{z0} t + \frac{1}{2}a_z t^2 \\

The equations for the velocity of the ball at time t are the first derivative of the position, so:

\frac{dx}{dt} = v_x(t) = v_{x0} + a_x t \\
\frac{dy}{dt} = v_y(t) = v_{y0} + a_y t \\
\frac{dz}{dt} = v_z(t) = v_{z0} + a_z t \\

Where \((x_0, y_0, z_0)\) is the release point as reported by PITCHf/x, \((v_{x0}, v_{y0}, v_{z0})\) is the initial velocity at that release point, and \((a_x, a_y, a_z)\) is the acceleration.

First, you need to calculate time t for when the ball was at 55 feet. Using the quadratic equation, you can derive t:

a = \frac{1}{2}a_y \\
b = v_{y0} \\
c = y_0 – 55.0 \\
t = \frac{-b – \sqrt{b^2 – 4ac}}{2a} \\

Now, using the equations above, you can calculate position and velocity at y = 55 feet.

Finally, to recalculate start_speed:

|v| = \sqrt{v_{x0}^2 + v_{y0}^2 + v_{z0}^2} \\

PITCHf/x Processing Scripts

I’ve uploaded some (very) rough perl scripts for processing PITCHf/x data to Bitbucket. These can retrieve the data, create the database, and store the data to the database (I know, surprising). They’re not configurable, yet (you have to modify the code to determine what to download). Anyway, I hope to clean up the code in the near future, barring other projects.

Remapping Caps Lock to Control in Windows

Years ago — before the creation of Sublime Text — I regularly used Emacs for editing (yes, even on Windows. For anyone who has any familiarity with Emacs, they know that you use the Control key like breathing air. Unfortunately, most keyboards were designed like the Control key was meant for the occasional tap, not continuous usage.


Because of this, I learned that you could remap the Caps Lock key to Left Control to make it more readily available to my RSI plagued hands. Invariably, though, I would have to search the web for the correct registry incantation to invoke this change. Tiring of this, I’ve decided to simply host the solution on this blog. What follows is the necessary changes, as well as an brief explanation of how this works.

Continue reading