Author
Published

Saturday, September 13, 2025

We’re now less than 3 weeks away from the release of Taylor’s 12th album, The Life of a Showgirl. One of the many reasons I’m excited for the new album is that this is a collaboration with Max Martin and Shellback, who have made some of my favorite Taylor Swift songs. As we wait for the album release, I thought it would be fun to look at how Taylor’s previous collaboration with Max and Shellback compare to the rest of her discography.

To do this we’ll use data on the audio characteristics of Taylor’s songs from the Spotify API, available in the taylor package. We’ll start by doing some data manipulation. First, we’ll filter out any songs that aren’t Taylor’s. We’ll remove songs where Taylor is features and songs she just has a writing credit for. We’ll also remove multiple versions of the same song. I’m keep the original versions of each song, but keeping the vault tracks, as those have no duplicate version. Finally, we can add an indicator variable to the previous collaboration between Taylor and Max Martin or Shellback.

library(tidyverse)
library(taylor)

tms <- taylor_all_songs |> 
  filter(str_detect(artist, "Taylor Swift")) |> 
  filter(!str_detect(track_name, "[\\(|\\[]Taylor's Version[\\)|\\]]") |
           str_detect(track_name, "From The Vault")) |>
  mutate(max_shellback = case_when(
    track_name %in% c(
      "I Knew You Were Trouble",
      "22",
      "We Are Never Ever Getting Back Together",
      "Message In A Bottle (Taylor's Version) [From The Vault]",
      "Blank Space",
      "Style",
      "All You Had To Do Was Stay",
      "Shake It Off",
      "Bad Blood",
      "Wildest Dreams",
      "How You Get The Girl",
      "Wonderland",
      "New Romantics",
      "Bad Blood (Remix)",
      "...Ready For It?",
      "End Game",
      "I Did Something Bad",
      "Don't Blame Me",
      "Delicate",
      "So It Goes...",
      "Gorgeous",
      "King Of My Heart",
      "Dancing With Our Hands Tied"
    ) ~ TRUE,
    .default = FALSE
  )) |>
  select(album_name, track_name, max_shellback, danceability, energy, valence) |> 
  mutate(album_name = case_when(track_name == "Bad Blood (Remix)" ~ "1989",
                                album_name == "Red (Taylor's Version)" ~ "Red",
                                .default = album_name)) |> 
  pivot_longer(cols = c(danceability, energy, valence),
               names_to = "metric", values_to = "value") |> 
  filter(!is.na(value))
1
Remove duplicate songs, keeping the original versions.
2
Add indicator for previous Max Martin and Shellback collaborations.

And now we can compare! The plot below shows the middle 97%, 89%, and 67% of songs on valence, energy, and danceability for each collaborator group. Taylor’s previous collaborations with Max and Shellback tend to have higher danceability, energy, and valence than her other songs. This definitely matches my own experience with these songs, and the reputation (pun intended) of these songs as Taylor’s pop-iest songs.

Code
library(ggdist)
library(ggpattern)
#> Warning: package 'ggpattern' was built under R version 4.5.1

rect_height <- .8
rect_pad <- 0.3

tms |> 
  group_by(max_shellback, metric) |> 
  median_qi(
    .width = c(.67, .89, .97),
    .exclude = c("album_name", "track_name")
  ) |> 
  mutate(.width = factor(.width)) |> 
  ggplot(aes(
    x = value,
    y = fct_rev(factor(metric)),
    width = .upper - .lower
  )) +
  geom_tile(
    data = tibble(
      value = c(.63, .60, .69, .54, .45, .35),
      metric = rep(c("danceability", "energy", "valence"), each = 2),
      max_shellback = rep(c(TRUE, FALSE), times = 3),
      .width = rep(c("0.67", "0.89", "0.97"), each = 2)
    ),
    aes(group = max_shellback, alpha = .width),
    height = rect_height,
    width = 0.01,
    fill = "grey20",
    position = position_dodge2(padding = rect_pad)
  ) +
  geom_tile_pattern(
    data = ~filter(.x, .width == "0.97"),
    aes(pattern_filename = max_shellback,),
    pattern = "image",
    pattern_type = "tile",
    pattern_scale = .5,
    height = rect_height,
    position = position_dodge2(padding = rect_pad)
  ) +
  geom_tile(
    data = ~filter(.x, .width == "0.97"), 
    aes(group = max_shellback),
    height = rect_height,
    fill = "white",
    alpha = 0.7,
    position = position_dodge2(padding = rect_pad)
  ) +
  geom_tile_pattern(
    data = ~filter(.x, .width == "0.89"),
    aes(pattern_filename = max_shellback,),
    pattern = "image",
    pattern_type = "tile",
    pattern_scale = .5,
    height = rect_height,
    position = position_dodge2(padding = rect_pad)
  ) +
  geom_tile(
    data = ~filter(.x, .width == "0.89"),
    aes(group = max_shellback),
    height = rect_height,
    fill = "white",
    alpha = 0.4,
    position = position_dodge2(padding = rect_pad)
  ) +
  geom_tile_pattern(
    data = ~filter(.x, .width == "0.67"),
    aes(pattern_filename = max_shellback,),
    pattern = "image",
    pattern_type = "tile",
    pattern_scale = .5,
    height = rect_height,
    position = position_dodge2(padding = rect_pad)
  ) +
  expand_limits(x = c(0, 1)) +
  scale_y_discrete(labels = str_to_title) +
  scale_pattern_filename_discrete(
    choices = c("glitter/glitter-orange.png", "glitter/glitter-green.png"),
    breaks = c("TRUE", "FALSE"),
    labels = c("Max Martin & Shellback", "Solo and Other Collaborators"),
    name = "Collaborator"
  ) +
  scale_alpha_manual(
    values = c("0.67" = 1, "0.89" = 0.6, "0.97" = 0.3),
    limits = c("0.97", "0.89", "0.67"),
    labels = c("97%", "89%", "67%"),
    drop = FALSE,
    name = "Interval"
  ) +
  labs(x = NULL, y = NULL, pattern_filename = NULL) +
  theme(legend.box = "vertical") +
  guides(
    pattern_filename = guide_legend(
      override.aes = list(pattern_type = "expand")
    )
  )

As someone who loves glitter-pen Taylor Swift songs, I can’t wait for the new album!

Acknowledgments

Featured photo by Summer Rune on Unsplash.