2 min read

USL in the 538 Global Club Soccer Rankings

538 recently added the United Soccer League to their Soccer Power Index ratings. I’m a Riverhounds fan, so I wanted to see how the team compared to teams from leagues around the world.

library(tidyverse)
library(ggrepel)

theme_set(theme_bw())
df <- read_csv("https://projects.fivethirtyeight.com/soccer-api/club/spi_global_rankings.csv", progress = FALSE) %>% 
  group_by(league) %>% 
  mutate(league_spi = median(spi)) %>% 
  ungroup() %>% 
  mutate(league = fct_reorder(league, league_spi))
df
## # A tibble: 576 x 8
##    name         league         rank prev_rank   off   def   spi league_spi
##    <chr>        <fct>         <int>     <int> <dbl> <dbl> <dbl>      <dbl>
##  1 Manchester ~ Barclays Pre~     1         1   2.8   0.2  92.5       67.3
##  2 Barcelona    Spanish Prim~     2         2   3.1   0.4  92         74.8
##  3 Bayern Muni~ German Bunde~     3         3   3.1   0.4  91.9       66.4
##  4 Real Madrid  Spanish Prim~     4         4   3.1   0.5  91.3       74.8
##  5 Liverpool    Barclays Pre~     5         6   2.7   0.4  89.5       67.3
##  6 Juventus     Italy Serie A     6         5   2.5   0.3  89.4       61.6
##  7 Paris Saint~ French Ligue~     7         7   2.8   0.4  88.9       59.8
##  8 Atletico Ma~ Spanish Prim~     8         8   2.3   0.3  87.1       74.8
##  9 Tottenham H~ Barclays Pre~     9         9   2.5   0.5  85.7       67.3
## 10 Chelsea      Barclays Pre~    10        10   2.4   0.5  85.1       67.3
## # ... with 566 more rows
df %>% 
  ggplot(aes(spi, league)) +
  geom_jitter(aes(color = league), show.legend = FALSE,
              height = .2,
              alpha = .7) +
  geom_jitter(data = df %>% filter(name == "Pittsburgh Riverhounds"),
              show.legend = FALSE,
              height = .2,
              alpha = .7) +
  geom_label_repel(data = df %>% filter(name == "Pittsburgh Riverhounds"), 
                   aes(label = name), 
                   size = 3,
                   show.legend = FALSE,
                   force = 6) +
  labs(title = "538 Soccer Power Index, 2018-19",
       subtitle = "One dot = one team",
       y = NULL,
       x = "Soccer Power Index",
       caption = "538 data, @conor_tompkins")

df %>% 
  ggplot(aes(spi, league)) +
  geom_jitter(aes(color = league), show.legend = FALSE,
              height = .2,
              alpha = .7) +
  labs(title = "538 Soccer Power Index, 2018-19",
       subtitle = "One dot = one team",
       y = NULL,
       x = "Soccer Power Index",
       caption = "538 data, @conor_tompkins")

This shows the offensive and defensive ratings of each USL team. The Riverhounds are squarely in the #LilleyBall quadrant.

df %>% 
  filter(league == "United Soccer League") %>% 
  ggplot(aes(off, def, label = name)) +
  geom_point() +
  geom_label_repel(size = 4,
                   force = 4) +
  scale_y_reverse() +
  labs(title = "538 Soccer Power Index, 2018-19",
       y = "Defensive rating (scale reversed)",
       x = "Offensive rating",
       caption = "538 data, @conor_tompkins")