Checking Out Attack Angle

statistics
r
baseball
Author

Mark Jurries II

Published

May 23, 2025

This week, Baseball Savant released new swing metrics, showing how steep player’s swings are and how often they swing at the ideal angle (5 to 20 degrees). Since Savant kindly offers CSV downloads, it was easy to get the data for 2025 season to date for qualified players only.

First, let’s compare swing tilt to walk rate. Yes, players with high walk rates by definition aren’t swinging as much, but are there certain types of swing profiles that walk more?

Show the code
library(gt)
library(gtExtras)
library(hrbrthemes)
library(tidyverse)

core_stats <- read_csv('stats.csv')
swing_stats <- read_csv('bat-tracking-swing-path.csv')
combined_stats <- core_stats %>%
  inner_join(swing_stats, by = join_by(player_id == id))

combined_stats %>%
  ggplot(aes(x = bb_percent, y = swing_tilt))+
  geom_point()+
  geom_smooth()+
  theme_ipsum()+
  ggtitle('Swing Tilt vs Walk Rate')

There’s no real relationship there - the regression line is pretty flat and the points are all over the place. Not unsurprising, but still, reassuring to see that the guys with the big swings also know when to hold.

On to the fun stuff - let’s compare swing tilt to wOBA.

Show the code
combined_stats %>%
  ggplot(aes(x = woba, y = swing_tilt))+
  geom_point()+
  geom_smooth()+
  theme_ipsum()+
  ggtitle('Swing Tilt vs wOBA')

I had to check the data after running this - I knew Aaron Judge was having a good year, but a .511 wOBA is just insane. He’s in the upper echelons of swing tilt with an average 39 degree angle. Overall, there’s a pretty good relationship between swing tilt and wOBA.

But there’s a problem. wOBA includes walks, and as we’ve already discussed, players don’t swing for at least four pitches when drawing a walk. We can turn to wOBAcon, which is simply wOBA on contact. This will exclude strikeouts - which often include swinging - so it still won’t be perfect.

Show the code
combined_stats %>%
  ggplot(aes(x = wobacon, y = swing_tilt))+
  geom_point()+
  geom_smooth()+
  theme_ipsum()+
  ggtitle('Swing Tilt vs wOBAcon')

This is our most positive correlation so far, with a clear relationship between tilt and wOBAcon. Shoutout to the leader in swing tilt, Riley Greene - he has the 9th highest wOBAcon in MLB.

So far, we’ve been eyeballing correlations. It would be tedious and inefficient to keep plotting metrics, so instead we’ll check the correlation between swing tilt and a whole bunch of metrics and see what comes up.

Show the code
combined_stats %>%
  select(player_id, k_percent, bb_percent, woba, xwoba, wobacon, xwobacon,
         barrel_batted_rate, hard_hit_percent, avg_best_speed, swing_percent,
         groundballs_percent, flyballs_percent, linedrives_percent, swing_tilt) %>%
  pivot_longer(!c(player_id, swing_tilt), names_to = 'metric', values_to = 'value') %>%
  group_by(metric) %>%
  summarise(correlation = cor(swing_tilt, value)) %>%
  mutate(rsq = correlation^2) %>%
  arrange(desc(rsq)) %>%
  gt() %>%
  gt_theme_espn() %>%
  fmt_number(columns = c(correlation, rsq), decimals = 3) %>%
  tab_header(title = 'Swing Tilt Correlation with Selected Metrics',
             subtitle = 'Qualified Batters through 5/23/25')
Swing Tilt Correlation with Selected Metrics
Qualified Batters through 5/23/25
metric correlation rsq
wobacon 0.260 0.068
woba 0.237 0.056
flyballs_percent 0.233 0.054
xwobacon 0.231 0.054
xwoba 0.209 0.044
barrel_batted_rate 0.192 0.037
linedrives_percent 0.127 0.016
groundballs_percent −0.113 0.013
bb_percent 0.095 0.009
avg_best_speed −0.091 0.008
k_percent 0.064 0.004
hard_hit_percent −0.061 0.004
swing_percent 0.057 0.003

Our old friend wOBAcon tops the list, though its RSQ of 0.068 is relatively low. Flyballs being high up makes sense, as does the negative relationship between swing tilt and groundballs. Swing percent is at the very bottom, not far from strikeout and walk rates, so we can conclude that swing tilt and plate discipline aren’t related.

Like any metric, tilt doesn’t tell us everything, but it helps us understand hitting a little more. There are a lot of directions we can go with the publicly available data - such as regression modeling, how pitchers attack hitters with different profiles, etc. - that will no doubt be explored as we get our arms around this.