Posts

Analyzing Strike Zone Data From the Statcast Database

Image
 With my Statcast database in Oracle nice and handy, let’s have some more fun and look at strike zone data. Strike zone data in Statcast is measured by two variables, plate_x and plate_z, which are like respective x and y coordinates of an axis. The strike zone is the width of home plate, which is 17 inches, although the rule book says specifically part of the baseball has to hit the strike zone for it to be a strike, so truthfully the strike zone is slightly wider than 17 inches. A baseball is three inches in diameter, so really the strike zone width is a number slightly smaller than 23 inches. Statcast measures plate_x and plate_z in feet, not inches. The middle of the strike zone width is a plate_x of 0 (like an axis origin of (0,0)), with pitches to the left being a negative value of plate_x and pitches to the right being a positive value of plate_x. For example, the strike zone is 17 inches wide (1.417 feet), so the left edge has a value of -0.7083 and the right edge has a ...

Introducing the Full Statcast Database (2019-2021)

Image
Back in July, me and my school partners created a similar data warehouse for every pitch thrown in the 2021 season up until June 23. The project was a lot of fun and you can read a PDF version of it here under the Data Warehousing section. I wanted to continue that project for all of 2021 and beyond, and have finally completed it. Baseball Savant contains data from every season since 2008, and Statcast metrics were measured starting in 2015. In a perfect world, I wanted my database to include everything since 2008, and at the very least 2015 to have a "Statcast Era" database, but unfortunately my student account in Oracle has a limited table space, so I was limited to 2019, 2020, and 2021. Across those three seasons, there were a total of 1,743,857 pitches thrown.  My database is set up in a similar dimension model "warehouse" style. The "fact table" contains all the pitches that I just described, with all their details such as velocity, spin rate, pitch ...