Heat Maps: What They Show, and Mistakes to Avoid
When David Appelman dropped his newest bomb on us the other day and announced that you could now find customizable heat maps here at FanGraphs, I think it’s safe to say that most of us saber-nerds had our minds blown. Personally, I’ve always admired the work that Dave Allen and other Pitch F/x gurus have done, yet being unskilled in the art of SQL and R, I figured this was a type of analysis that would always be beyond my abilities. Following in the footsteps of other FanGraphs updates, though, this analysis has now been democratized and made available to even the newest of saber newbies. You don’t have to know how to string together code or manipulate huge data sets: all you need is a mouse and a pointer finger.
But heat maps are like any other tool: before you can add them to your toolbox, you have to understand how to use them. Pitch F/x data can be a tricky thing to interpret, and many experienced saberists (myself included) have made mistakes because they didn’t know what they can and can’t do with that data. What exactly are heat maps? What do they show, and how should we use them? Let’s go exploring:
Heat Maps are rather intuitive: quite simply, they’re a strikezone plot that shows how often a pitcher throws a pitch in a certain location. To use David Appelman’s example, if you want to know where Mariano Rivera throws his cutter against lefties (or righties), this is the tool for you. These specific heat maps won’t tell you anything about a pitch’s movement, velocity, or effectiveness – they’re strictly plots of pitch location – but that doesn’t mean they’re without their uses. By looking at heat maps for pitchers, you can learn how a pitcher’s repertoire varies between lefties and righties, where in the zone they attack lefties and righties (and with what pitches), and if they hit the corners or leave many pitches over the plate.
When you look one of these heat maps, you’re looking at the strike zone from the catcher’s perspective. This is a detail that confuses many people, since we’re used to watching baseball from the pitcher’s perspective, but this is how all Pitch F/x charts are set up by default. If you need a visual to understand, here’s my (very) rough attempt:
(I know, I know, I have mad Paint skills. This is years of practice, folks.)
Now that you know what Heat Maps are and what they show you, let’s discuss some common analytical mistakes to avoid:
– Pitch Classifications: As Dave Allen told me, “The graphs are only as good as the pitch classifications.” There are hundreds of thousands pitches thrown over the course of a baseball season, and therefore there are hundreds of thousands of lines of data that need to be classified and organized. The people at MLB Advanced Media (MLBAM) are responsible for creating the algorithm that sorts pitches – this is a cutter, this is a fastball, this is a slider, etc. – and that algorithm has changed and improved over the years.
Due to these changes in the algorithm, you should be very careful when looking at a pitcher’s heat maps over time. While it may look like a pitcher has dramatically changed his pitch selection and location over the past few years, that’s likely the result of his pitches being reclassified. For example, look at Mariano Rivera’s fastballs and cutters over time. It looks like Rivera used to throw few cutters and lots of fastballs, but we all know that’s not true: Rivera has always predominantly thrown a cutter. Those cutters were just classified as fastballs in the past.
– Sample Sizes: As with all statistics or graphs, you should always be careful about drawing conclusions from a small amount of data. This shouldn’t be a concern with starting pitchers, who throw a large amount of innings and pitches each season, but I’d hesitate before using these heat maps to draw conclusions about pitchers that only had a few starts in one season or pitched a small number of innings in relief. These heat maps are good at showing us large, overarching trends, and it’s difficult to have a “trend” if you’ve only pitched a small number of innings.
– Over-Smoothing: Creating a perfect heat map that displays useful data is more an art form than a science. Since David Appelman gave us all control over the definition and color scheme of the heat maps, you can make the exact same data look a variety of ways. For example, here are a number of different ways to look at Rivera’s 2010 cutter usage versus lefties:
Each map is displaying the exact same data, yet each one looks vastly different and tells you different information. You want to make the data look pretty by smoothing out the heat map and making the color gradient flow, but at the same time you don’t want to over-smooth your map and remove all valuable information, like in the first two charts on the top row. It takes time to find the happy medium – the one that looks best while also still remaining true to the underlying data.
– Over-Stating Results: Remember, these heat maps will only show you information on pitch location – NOT on pitch movement, velocity, or effectiveness. They can tell you which pitches a pitcher throws against each hand and where those pitches are normally located, but you shouldn’t use these charts to make exaggerated claims. If you’re trying to understand why a pitcher has been effective or ineffective in certain situations, it’s best to look not just at these heat maps, but also at pitching statistics and all the Pitch F/x charts available. Pitchers are notoriously tricky to properly evaluate, so if you think you’ve found a simple solution/answer to a pitcher’s problems, you’re probably wrong.
These heat maps can be a great evaluative help when used properly, and if nothing else, they’re a heck of a lot of fun to look at. Keep all these above caveats in mind if you try using them for analysis, but if you’re just looking to have some fun, enjoy!
For more information, check out the new Heat Maps page in the FanGraphs Library.
Piper was the editor-in-chief of DRaysBay and the keeper of the FanGraphs Library.
Holy cripes! So useful! I had wondered why I didn’t understand the perspective on heat maps. I pitched for 16 years, and I look at games from the perspective of one standing on the mound. Heat maps should reflect that–he’s the one throwing the pitch; plotting a plan of attack! They’ve got it turned around. This needs to be cleared up and explained.
That’s generally the way we view games on TV, too, from a center field camera. It does not make sense to show heat maps from the receiving end.
All Pitch F/x plots are shown from the catcher’s perspective. It simply is what it is….considering how much work has been done in the field already, it’d be more confusing to change them at this point.
Living in Japan and watching hundreds of games on mlb.com’s gameday from the catchers perspective certainly helped make it less confusing for me, in fact this is the way I’d prefer it. Also many videogames have you bat from the catchers perspective…
That being said, would it be that hard to have “catcher’s view” posted at the bottom or top of each map (like a catcher “compass”)?
Yah, I think intuitively you can dig into these things a lot easier if you’ve played video game baseball. MVP Baseball 2005, WHAT?! Best baseball game ever made and available for under $2.00 at any used game score.
And I challenge any one of your many Toronto writers to an MVP home-run off. I am the tractor king, bitches.
Anyways, I noticed the other day that Fangraphs had added INSIDE – CENTER – OUTSIDE to the bottom of their pfx location graphs. It’s handy and maybe it’s been there since the inception.. who knows.
I like the heat maps though, but I still think they can lead to a lost of nasty analysis in the short-term. Personally, if there’s one thing that I’d love to see is heat-maps sortable by count.
If you could sort, I dunno, Fausto Carmona’s fastball at 0-0 and compare it to 3-0,3-1,3-2, you might be able to get into some neat analysis.
As it stands, it’s just a very broad picture without context. If I had to pick and choose, I’d take count context over anything you mentioned in “over stating results” — Although, it would be pretty nice to see the linear weight updated above it.
These are awesome! What are the top left rainbow ones showing us?
These are great, but…
You discuss the sample size issues, but there really ought to be an associated error map to go with the heat map. I would suggest always serving up both images together. The calculation would be fairly simple, and the error maps would be easy to generate.