clock menu more-arrow no yes mobile

Filed under:

Current public Statcast tracking data

There are 37 games of Statcast tracking data available on the MLB Gameday server. Here's how to find them and how to understand them.

Charles LeClaire-USA TODAY Sports

UPDATE -- Sometime in the first week after I posted these two articles, MLB removed the Statcast data from their website. Please contact me directly if you'd like access to what I have.

At the Sloan Sports Conference in March 2014, Major League Baseball announced the existence of a new data collection system that promised more information than was ever available before about the game. The new system would use multiple technologies to track both the ball and the players, giving users incredibly detailed information about everyone and everything's position and velocity multiple times per second. It was said that this system, called Statcast, would produce seven terabytes (that is, ~7000 gigabytes) of data per game, and that it would be ready to go league-wide at the start of the 2015 season.

Unfortunately, Statcast hasn't really lived up to the internet's expectations, both in terms of data availability and data reliability. Unlike what happened with PITCHF/x, there didn't appear to be any publicly-accessible source of the tracking data. For the first ten or so games of the season, there was a new file in the PITCHF/x directory that contained batted ball exit velocity and launch angle, but that rapidly stopped existing. It was later discovered that these same data were available from a different MLB source, and working from these files Daren Willman has put together and excellent resource at his Baseball Savant site for querying the available data, but it was shown this summer both here at BtBS and at FanGraphs that 1) not all batted balls had data included in that source, and 2) the batted balls that did include the new data were not randomly sampled from the total set of batted balls, but were more likely to be well-struck balls. BtBS's own Neil Weinberg found that for a reasonably random subset of data the wOBA on batted balls with data was .438, versus .364 on balls without the data.

Now, to be sure, MLB itself has been making trememdous use of the Statcast data. During broadcasts all season long we've seen on-screen data about player speed, acceleration, and reaction time, as well as exit velocity and launch angles, and this has been terrifically interesting. However, much of the information presented thus far has been in a "processed" form - MLB decided that the top speed at which a center fielder runs towards a fly ball is enough for the general public for now. Access to raw data with which analysts and hobbyists could create their own metrics is effectively non-existent to this point.

I say effectively non-existent because there is a small set of Statcast tracking data accessible from the same file system as PITCHF/x data. There are 37 games from the first few days of the season. Anyone who goes to look can access player tracking, ball tracking, and pitch information as collected by the Statcast tracking system.  Here's what those data look like.

Statcast Files

Hidden Statcast treasures are found within these folders

The existing Statcast data are found within the 'play-builder' folder at If you go to, you're presented with a list of about 100 sub-folders, all of which are labeled numerically. Each of these contains Statcast tracking data; however, only 39 of them correspond to regular-season games. These are labeled with the same six-digit game id number you'd find anywhere in MLB's data structure for these games.  It's not clear to me what the other folders are from; the files within them that contain dates are indicate that they're from late March or early April, so it seems likely to me that they're from some sort of testing project.  MLB games are numbers 413649 through 413693.

Within an individual game folder, there are either three or four subfolders: Combined, Event, Live, and Refined. Inexplicably, "Event" is missing from some games.  Each folder can contain anywhere from just a few to literally 200,000 JSON files. The "Combined" folder looks to contain data assembled from the other folders, and I'd speculate that it has something to do with the public presentation of the information. There are only a few plays' worth of data in this folder, and from here on out I'll be ignoring it.

A quick note: all files mentioned below are in JSON, or JavaScript Object Notation, format. It's a way to hierarchically store data in a text format.

The "Event" folder contains files that are sort of akin to each play's metadata. There are usually about 10 files per recorded play, and in total anywhere from a few hundred to nearly a thousand per game; the file names appear to contain timestamps, and it would make sense if they corresponded to something like "time of data collection", but I haven't been able to reconcile them.  Event files, where they exist, describe what happened during a play and who was on the field at the time. Positions 1-9 are the fielding lineup, position 10 is the batter, 11-13 are runners (and the field is "NULL" is the base is empty), and 14-19 are the umpires. The file further tells you who was specifically involved in the play, and what the situation was (balls, strikes, outs, inning). Here's an example.


This tells you the game id number (413649), the play id number (guid), the player and umpire id numbers (e.g., the pitcher's ID is 433587), and then some event information. In this case, it's saying there was a batting event ("pos":10), there was a fielding assist by the second baseman ("pos":4,"typ":"f_assist"), a putout by the shortstop ("pos":6,"typ":"f_putout"), a groundout credited to a the current pitcher ("pos":1,"typ":"p_ground_out"), and the play in general was a force play ("typ":"force_out"). The file also describes the game situation in a weird mix of pre- and post-play information. Following this play there are two outs, and this occurred on a 1-0 count in the top of the 4th.  This particular game is the Mariners' opener; this was a 4th-inning fielder's choice hit by Matt Joyce where Pujols was forced out at second, FC 4-6.  It's not clear to me why there are so many files per play, because the information doesn't appear to change between any of them.

The "Live" folder is much larger. It contains JSON files with XY positioning of all people recognized by the system, as well as some further information that varies in type file-to-file. These files contain a few timestamps (on different scales), x-y positioning for everyone on the field, x-y-z positioning for the ball (though it's usually NULL), and data from one or more "pkgs". Type 0 contains pitch speed (out to a ridiculously absurd 13 decimal places) and not much else; Type 1 has more detailed pitch info - some PITCHF/x-style stuff, 3D velocity, spin, approach angles. Type 2 is the most common and the longest by far (usually over multiple files), and is position and trajectory data for the ball over the course of the whole play. Types 4, 9, and 10 are all part of measuring the flight of a ball in the air (whether it's a pitch or a batted ball), and there seems to be a bit of overlap between them. Types 7 and 8 describe the precise circumstances and results of the plate appearance. Types 3, 5, and 6 seem to not exist, at least in this data set. There are about 4000 live files per game.

Here's a type-0 example:


And here's a very abbreviated type-2 example (they're usually much, much longer):


Lastly, there's the "Refined" folder, which is by far the largest of the four types -- there are roughly 100,000-200,000 files per game there. These files are the extremely granular, two-dimensional tracking files for on-field people detected by the system. The timestamps within these files indicate that the data are being recorded every hundredth of a second. These files have a similar structure to the beginning of the "live" files, giving a "typ:, x, y, and "id" for each tracked object; however, the "typ" and "id" don't always have data associated with them, making it difficult to actually use the files to track players. Here's an example of what it looks like:


So, that's about it. There are a total of about 125,000 lines per game (though I haven't done the exact math on that), meaning there are about 4.5 million rows of data from these 37 games. However, that doesn't tell the whole story.

If you dig into the PITCHF/x files, you'll find that included with many (but importantly, not all) of the individual recorded pitches is a field labeled "play_guid." You may have also noticed that there's a field called "guid" in all of the files types I described above. I observed that many of the Statcast files had GUIDs that matched those found in the PITCHF/x files, which seemed too unlikely (given their length) to be random, and I was able to confirm via some of the live files that the data do correspond with each other. However, only about half of the Statcast files can be matched to a particular pitch. It's not clear at all to me where the extra data come from; a good example can in the first game recorded, which was Anaheim v. Seattle on the 6th of April. There's a particular Peter Bourjos plate appearance that lasted four pitches, but shows data recorded for nine pitches. There was speculation throughout the season that there were issues with the quality of the data being produced by the Statcast system; taken with the missing batted ball data from the other source, this seems like excellent confirmation that this is true.

The available data have left me with a somewhat paradoxical feeling -- it simultaneously seems like there's too much and not enough data. Having only 37 games is too small of a sample to be able to establish anything about individual players, especially since there are only at most four games per team, but having nearly 200,000 data points available per game requires a good plan for data management and analysis in advance.  That's the point of writing this -- even though only a few games' worth of data are available, my hope is that by providing the public at large with a description of and a method for acquiring what's out there good analytical methods can be established in advance of what will hopefully be a much larger release of data next year.

In a separate article, I've detailed a script I've written in Python that downloads all the important Statcast data and organizes it in what I think is a logical way.  The article also contains a few examples of the visualizations possible with the tracking data.


John Choiniere is a researcher and occasional contributor at Beyond the Box Score.
You can follow him on Twitter at @johnchoiniere.