Introducing the Interactive Spray Chart Tool

I’ve been working on an interactive tool that allows you to create spray charts using Game Day data from the past two years for a few weeks now. I’ve always loved the Katron Batted Ball tool, and it’s been a great resource of mine for years. However, I wanted to put something together that was a bit more interactive, allowed for more filtering, and made side-by-side comparisons easier.

Our writers here at FanGraphs have been kind enough to play around with it and offer suggestions. After some tweaks I am ready to officially release the tool into the wild so that anyone can use it.

There are three dashboards that users can leverage:

  • Player Year-to-Year Comparison: On this dashboard you can select a single player and see side-by-side comparisons of their batted ball performance for 2012 compared to 2013. So you can see how Mike Trout‘s batted balls fared in 2012 compared to 2013:

Screen Shot 2013-11-04 at 9.14.41 AM

  • Player Comparison: Here you can select a player on the right-hand side and compare them to another player (or all players) on the left-hand side. Want to compare Mike Trout and Miguel Cabrera‘s batted ball distributions in 2013? Have at it:

 Trout_Miggy

  • Park Comparison: Here you can compare batted balls for a single park, multiple parks, divisions, leagues, etc. Choose a park on the left and then decide if you want to exclude that park (or multiple parks) from the comparison on the right. You can also filter the comparison parks on the right by league or division. So for example, you can see how David Wright performed on batted balls over 300 feet in Citi Field compared to the rest of the National League East:

Wright_NLE_Citi

This is not HITf/x data (boy, I wish), but is taken directly from the Game Day PITCHf/x feed. That means you need to use and interpret this data with a bit of a grain of salt, as the location data is based on where the ball was fielded, not on where it hit the ground.

In terms of the various filters you can apply, here’s a rundown:

Year or yearid: Filter batted balls by either the 2012 or 2013, or view them both together.

League and Division: Filter batted balls by the league (NL or AL) or the division (e.g. National League West).

Stand: The handedness of the batter.

Zone: Area on the field where the batted ball was hit to. Zones are divided into 13 buckets, with batted ball angles of <=-55 being Zone 1, >-55 to <=-45 being Zone 2, etc.

Distance: Distance of the batted ball as tracked by GameDay. Remember, this is where the fielder picks up the ball, not it’s estimated true distance. This can be misleading when looking at a park like Fenway given balls hit off the Green Monster.

Angle: Angle of the batted ball relative to home plate, which is set at zero degrees. Negative angles are left field, positive angles are right field.

Batted Ball Type: Batted balls were coded into four buckets; FB – fly balls, GB – ground balls, LD – line drives, PU – pop ups.

Run Value: Batted balls were coded into five different run values; -.28 – outs, .5 – singles, .79 – doubles, 1.07 – triples, 1.41 – home runs

The tool will also allow you to zoom in on various areas of the spray chart to examine the data points more finely. There are tons of possibilities.

Click here to go the actual tool. Feedback is certainly welcome. Also, feel free to use the tool for your own work/articles, etc. I just ask that you link back to this article and/or the tool itself.

———
Data and analysis assistance provided by the amazing Jeff Zimmerman and Baseball Heat Maps.

Visualization tool courtesy of the fantastic Tableau Public.



Print This Post



Bill works as a consultant by day. In his free time, he writes for The Hardball Times, speaks about baseball research and analytics, consults for a Major League Baseball team, and has appeared on MLB Network's Clubhouse Confidential as well as several MLB-produced documentaries. Along with Jeff Zimmerman, he won the 2013 SABR Analytics Research Award for Contemporary Analysis. Follow him on Tumblr or Twitter @BillPetti.


Sort by:   newest | oldest | most voted
Guy
Guest
Guy
2 years 6 months ago

amazing

ryan
Guest
ryan
2 years 6 months ago

Incredible work!
One thing I notice is that the sliders for ‘Angle’ seem to be very sensitive. Could these be re-calibrated to only go from 0 to 180 on the left and right?

Brandon
Guest
Brandon
2 years 6 months ago

I second this. The angles get big fast, for no real reason.

younga18
Guest
younga18
2 years 6 months ago

This is magical.

Rob H.
Guest
Rob H.
2 years 6 months ago

Incredible! Thanks very much.

Is it possible to download this annual data (especially avg. batted ball distances) anywhere?

Brandon
Guest
Brandon
2 years 6 months ago

This tool is great for seeing things visually–I find the comparative ability to be especially useful since I don’t have ‘average’ batted ball characteristics memorized.

Frank
Guest
Frank
2 years 6 months ago

Orson Welles would applaud this.

Landon
Guest
Landon
2 years 6 months ago

This is fantastic. Thanks Bill

Jonah Pemstein
Member
Member
2 years 6 months ago

This is fantastic… however, I would love it if the data points could be color coded based on batted ball type (e.g. flyball, groundball, line drive), not outcome (single, double, triple, home run, out).

Jonathan C. Mitchell
Member
2 years 6 months ago

This is greatness!

pft
Guest
pft
2 years 6 months ago

Looks like a great tool. Look forward to playing with it.

channelclemente
Guest
channelclemente
2 years 6 months ago

A standard is born, and cool is defined.

Lee Panas
Guest
2 years 6 months ago

Bill, This is outstanding. I’m going to spend a lot of time looking at it.

GoodasGoldy
Guest
GoodasGoldy
2 years 6 months ago

Really informative tool and so easy to use. Thanks!

GoodasGoldy
Guest
GoodasGoldy
2 years 6 months ago

While viewing a spray chart I was looking at the RunValues for each type of outcome and am curious. What is the RunValue of a walk? Are there different RunValues for different types of outs (ie. strikeout vs. groundout vs flyout)?

bob
Guest
bob
2 years 6 months ago

I noticed Allen Craig in 2012 hit about 30 line drives in play to the left outfielder. That is, angle less than -15 degrees and distance more than 175 feet, with homeruns excluded. He got a hit on every one. In 2013 his spray pattern was remarkably similar but he was out seven times on line drives to left. I’m afraid that could be a problem with small sample size, but is it possible the defense played him differently in 2013 or that he somehow was able to aim the ball in 2012 to keep it away from the left fielders?

This also leads be me wonder if BABIP can be broken down to smaller categories, such as batting average on line drives in play. Again, the sample size might be way too small, but I’d still be curious to see the numbers

Daniel Schwartz
Member
2 years 6 months ago

Bob, you can find babip and avg. On each ball in play type in a player’s splits page fyi. Under the ‘advanced’ segment

Mikhel
Guest
Mikhel
2 years 5 months ago

I wonder if it could include an option to contrast side-by-side how a player did vs LHP and vs RHP (in 2012 vs 2012, 2013 vs 2013, 2012 vs 2013, and 2012+2013 vs 2012+2013).

Brad
Guest
Brad
1 year 11 months ago

Bill,

This is awesome. I am reviewing the 2013 season and there seems to be some data discrepancies that you should be aware of. There appears to be 24 games missing from the 2013 data:
3-Apr-13 CHN @ PIT
3-Apr-13 CLE @ TOR
14-May-13 KCA @ ANA
14-May-13 ATL @ ARI
14-May-13 COL @ CHN
14-May-13 HOU @ DET
14-May-13 WAS @ LAN
14-May-13 CIN @ MIA
14-May-13 CHA @ MIN
14-May-13 TEX @ OAK
14-May-13 CLE @ PHI
14-May-13 MIL @ PIT
14-May-13 NYN @ SLN
14-May-13 BOS @ TBA
14-May-13 SFN @ TOR
23-Jul-13 CHN @ ARI
23-Jul-13 TBA @ BOS
23-Jul-13 MIA @ COL
23-Jul-13 SDN @ MIL
23-Jul-13 ATL @ NYN
23-Jul-13 CIN @ SFN
23-Jul-13 PHI @ SLN
23-Jul-13 LAN @ TOR
23-Jul-13 PIT @ WAS

and some partial data from games that shouldn’t exist:
16-Apr-13 STL @ PIT
2-May-13 TBA @ KCA
28-May-13 CHC @ CHA

I can remove the partial game data from my file, but I am unable retrieve data from the missing games even by doing searches on the pitchers and batters from those games. It appears the data is not available. Any assistance would be greatly appreciated.

Regards,

Brad

Spit Ball
Member
Spit Ball
1 year 7 months ago

This is freaking radical, awesome and shweeet. Thank you Bill!

wpDiscuz