Mad Max

Eric Schmidt
baseballongcp
Published in
4 min readOct 27, 2018

Note: special thanks to co-author Steve Sandmeyer aka Sandy

We’ve reached game four of the Fall Classic as we continue our analysis of the World Series using Google Cloud. The Dodgers are within a game in a 2–1 series after an epic game 3 win in a tidy 7 hours, 20 minutes and 18 innings of play. If it seems like the game just ended a half hour ago, it’s probably because it did. Boston is still in the driver’s seat — and by winning the next two games in L.A. — can claim another crown to join the 1903, 1912, 1915, 1916, 1918, 2004, 2007 and 2013 championship teams. Los Angeles has momentum — and if they can tie the series at two games apiece — game 5 in Dodger Stadium will become a super-charged atmosphere.

Muncy dog pile

Now that the jail sentence of game 3 has been served, what will each team do in terms of starting pitching? Nathan Eovaldi (BOS) — the scheduled game 4 starter — was pressed into action last night (earlier this morning?). Eovaldi threw 97 pitches in 6-plus innings of work and is not an option to start game 4. Instead, it will be Eduardo Rodriguez (BOS) vs Rich Hill (LAD) in a battle of southpaws.

For this post we reuse our existing BigQuery views for pitcher analysis to look at individual batter metrics and build a hot zone visualization, specifically for Max Muncy — as such we depart SQL land and jump into iPython for some deeper wrangling.

%load google.cloud.bigquery'''
- I now have access to BigQuery via magic cell syntax.
- This enables me to push down my aggregations across all pitches.
- In this case I want to extract slash line stats, but also
create a density plot of strike zone hit locations.
- BiqQuery pipes response rows directly to a pandas dataframe. From there we are off to the races...
'''
%%bigquery pitches
SELECT
sched.year,
season,
in_play,
sz_top,
sz_bottom,
loc_x,
is_pa,
total_bases,
...
FROM
`**.tensorpitch.mlb_pbp` AS pitch
LEFT JOIN (
... ) AS features
ON
game_id = pitch.game_id
WHERE
year in (2018)
AND type = "P"
AND in_play = 1
AND is_pa_over = 1
AND hitter = "Mad Max"
hr = pitches["total_bases" == 4]
hr.groupby("pitch_type).agg(...)
...
# build awesome hot zone graphic

Let’s look at some data.

Baseball has a way of highlighting previously unknown players on a big stage. Last night’s game winning home run was hit by Max Muncy. Muncy is a remarkable story — and pretty much came out of nowhere to hit a whopping 35 home runs in only 395 at bats during the regular season. He is a 28-year old who was cut by the Oakland A’s last year during spring training. He was unemployed for a month — with no team bothering to give him a look. Then the Dodgers signed him to a minor league deal and put him in triple-A for the entire 2017 season — and that’s where he started the 2018 season as well — before the Dodgers called him up in mid-April.

Now that Muncy can add winning a World Series game to his list of amazing accomplishments this season, let’s take a closer look at the data to see when, where, and how he has been successful at the plate. For starters, Muncy hit a cutter out of the park to win it in the 18th. He referenced his previous at bat against Boston’s Nathan Eovaldi to ground himself in the idea he might see the same pitch.

“The at-bat before, he had got me on a really good backdoor cutter. He had really good stuff all night long and he wasn’t missing a spot. Next at-bat he tried to go backdoor cutter again, but he left this one a little over the plate, and thankfully for me he did that, because I was able to get my bat to it.’’

A closer look at the data gives us a good idea about what Muncy prefers to see. Although small population size, he likes the hard stuff including cutters.

(2018 REG ONLY — ranks are ordinal, lower is better, compared to all players)

Count wise he thrives on 0–0, 0–1, 1–1.

(2018 REG ONLY — minimum of 20 counts faced, ranks are ordinal, lower is better, compared to all players)

Location wise his sweet is spot just off center inside; however, he trends towards outer slightly up. Baseball is a funny game.

Pitch location (normalized to batter’s strike zone) for all triples and home runs for Max Muncy (2018 REG)

Muncy homered on pitch number 7 facing a 3–2 count. His third pitch was a cutter, a ball middle away. He went on to foul two pitches #5 (cutter) and #6. Eovaldi made very few mistakes in his 97 last night pitches. Pitch #7 was outer middle — enough for him to get solid contact — a 90.1MPH cutter (FC).

The Dodgers are desperately seeking offense, even as they only need one more win tonight to even the series at two games apiece. Can Muncy come to the rescue again? Perhaps only if Boston makes a mistake against him one more time…

NOTE: You can hack on similar data in BiqQuery by heading over to our public datasets hosted on Google Cloud. After the World Series we will post new data from 2018.

--

--