The Evolution of Taylor Swift’s Music and Lyrics


Yellow Kangaroo
Caroline Ruggiero, Doreen Luo, Yuze Qin


Taylor Swift is one of the most popular musicians in the U.S., boasting over 534 million combined followers on social media. Throughout her career, she has released over 270 songs and won 14 Grammys. Given these facts, we believe her songs significantly impact the modern music industry. Her discography serves as a rich resource for analyzing evolving societal musical tastes and trends. By exploring the evolution of musical attributes and themes across her albums, we aim to gain valuable insights into consumer preferences and the dynamics of the U.S. music market.

For this project, we obtained our data from the taylor R package, which comprises 3 main datasets:

  • taylor_album_songs (29 variables, 194 observations) includes all lyrics and audio features from the Spotify API for songs from Taylor Swift’s official studio albums.

  • taylor_all_songs (29 variables, 274 observations) extends to her entire discography, encompassing EPs and singles.

  • taylor_albums (5 variables, 14 observations) summarizes her album release history.

Question 1  Taylor’s Sound Evolution Over Time

How has Taylor Swift’s musical style evolved in terms of emotional tone and energy over her career?


Taylor Swift’s musical career has been a journey through various genres, from country to pop to indie and alternative. The evolution of musical attributes such as valence and energy offers a glimpse into her artistic development and how her music has changed over time.

To analyze the evolution of Taylor’s musical style, we use the following parts of the dataset:

  • Album and track information: Album and song titles to track chronological evolution.
  • Audio Features:
    • Valence: A measure of musical positiveness, with higher valence indicating a more positive, happier, and cheerful sound, while low valence suggests a more negative, sad, or angry vibe. We chose to focus on this metric because it provides insights into the emotional tone of her albums.
    • Energy: A measure of intensity and activity. Typically, energetic tracks feel fast, loud, and noisy, while low-energy songs might be more reflective or soft. Looking at this metric can show changes in Taylor’s musical intensity over time.

Our interest in this question comes from a desire to understand the nuances of modern musical evolution within the market. We aim to find patterns that signify broader trends in the music industry. The creation of variables to measure yearly averages of these features will enable us to analyze trends over Taylor’s albums, providing a comprehensive overview of her musical journey.


To address the question of how Taylor’s musical style has evolved over time, we will first create a scatterplot that leverages valence and energy as the primary variables of focus. By plotting average valence (musical positivity) on one axis and average energy on the other, we can identify patterns or shifts in Taylor’s music style, seeing how albums might cluster or spread out. We will use color mapping to differentiate between albums, specifically with colors from the corresponding albums for easy identification.

Following the scatterplot, a ridgeline plot will focus exclusively on the distribution of valence scores across Taylor’s albums, arranged chronologically. The ridgeline plot is particularly effective for this purpose because it allows for the comparison of valence distributions between albums, showcasing variations in emotional tone within and across her discography. Each ridge represents the density of valence scores for an album, thereby showing the range and concentration of emotional tones she explores in her music. By using color to distinguish each album similar to the scatterplot, this plot will provide a detailed view of the emotional landscape of Taylor’s music.


font_add_google("Inter", "sans-serif")

# Filter out "Taylor's Version" albums and EPs
original_albums <- taylor_all_songs |>
  filter(!grepl("Taylor's Version", album_name)) |>
  filter(!ep & ! |>

albumColors <- c(
  "Taylor Swift" = "#00605f",
  "Fearless" = "#885f00",
  "Speak Now" = "#60005f",
  "Red" =  "#870000",
  "1989" = "#d6e9ff",
  "reputation" = "#5b5b5b",
  "Lover" = "#fa4988",
  "folklore" = "#c7c1BC",
  "evermore" = "#5f0000",
  "Midnights" = "#8787af"

album_averages <- original_albums |>
  mutate(album_name = fct_inorder(album_name)) |> # keep album order
  group_by(album_name) |>
    average_energy = mean(energy, na.rm = TRUE),
    average_valence = mean(valence, na.rm = TRUE)
  ) |>
  mutate(album_label = as.character(row_number())) # for labeling points on the plot

       aes(x = average_energy, y = average_valence, color = album_name)) +
  geom_point(size = 5, alpha = 0.8) +
    aes(label = album_label),
    vjust = 0.5,
    hjust = 0.5,
    color = "black",
    fontface = "bold",
    size = 3
  ) +
  scale_x_continuous(limits = c(0.4, 0.7)) +
  scale_color_manual(values = albumColors) +
  theme_minimal() +
    title = "Evolution of Taylor Swift's Sound",
    x = "Energy",
    y = "Musical Positiveness",
    color = "Album"
  ) +
    plot.title = element_text(
      hjust = 0.5,
      family = "Inter",
      size = 17,
      face = "bold",
      margin = margin(b = 20)
    axis.title.x = element_text(margin = margin(t = 20), family = "Inter"),
    axis.title.y = element_text(margin = margin(r = 20), family = "Inter")

# Plot valence score across albums
ggplot(original_albums, aes(
  x = valence,
  y = fct_reorder(album_name, as.Date(album_release)),
  fill = ..x..
)) +
  geom_density_ridges(aes(fill = album_name), alpha = 0.9, scale = 1.5) +
  scale_fill_manual(values = albumColors) +
  scale_x_continuous(limits = c(0, 1)) +
  theme(axis.text.y = element_text(size = rel(1.3))) +
  theme_ridges() +
  labs(title = "Musical positiveness of Taylor Swift Albums", x = "Musical positiveness", y = "Album") +
    legend.position = "none",
    plot.title = element_text(
      hjust = 0.5,
      family = "Inter",
      size = 20,
      face = "bold",
      margin = margin(b = 20)
    axis.title.x = element_text(
      margin = margin(t = 20),
      hjust = 0.5,
      family = "Inter"
    axis.title.y = element_text(
      margin = margin(r = 20),
      hjust = 0.5,
      family = "Inter"


The biggest trend we see in the scatterplot is that Taylor’s earlier albums (1-5) are clustered towards the top right of the plot, indicating relatively higher levels of energy and musical positiveness compared to her more recent music. Moving to album 6 (reputation), we see a significant drop in valence which reflects its themes of anger and defiance, diverging from the previous more light-hearted narratives. As we progress to albums 7 through 10, there is not a clear trend in musical positiveness but we see that there are lower levels of energy, suggesting a shift towards a more introspective and subdued musical style. This could be Taylor wanting to explore more complex emotional landscapes and shift away from the high-energy pop anthems of her earlier years. Overall, the evolution we see in the scatterplot showcases Taylor’s growth as an artist from the more constrained emotional range of her early days to a broader emotional spectrum in later works.

The ridgeline plot shifts to focus on just the distribution of valence scores across different albums, presenting a visual narrative of the emotional tone in her music overtime. There does not seem to be a clear trend in valence due to the broad spread of valence scores within each album, reflecting a variety of emotional expressions. The distribution for her earlier albums Speak Now and Red are bimodal, which seems fitting since these are her transitional albums where she’s starting to make inroads into pop, which tend to feature more high-energy, upbeat tracks. The bimodality captures the different moods within a single album, showing Taylor’s experimentation with and blending of different genres. The latest albums, including evermore and Midnights, show distributions that are less skewed towards the higher valence which indicate more of a balance of emotional tones, but with a trend towards themes that are more reflective and subdued. Overall, each album’s distribution of valence scores offers a snapshot of the mood Taylor sought to capture at that point in her career, revealing a fascinating progression of her emotional exploration.

Question 2  Lyric and Themes

What are the most common themes and words in Taylor Swift’s lyrics across her albums?


Exploring the common themes and words in Taylor Swift’s lyrics across her albums allows us to learn shifts in market tastes and preferences over time. Analyzing the evolution of lyrical content in Swift’s discography enables us to mirror the transformation in listener interests and cultural inclinations. This analysis positions Taylor Swift not merely as a pivotal figure in music but as a representation for evolving societal moods.

Our interest in this question is from the belief that the thematic evolution in Swift’s lyrics can shed light on broader trends in consumer preferences within the music industry. As Taylor’s songwriting adapts to her audience’s changing tastes, her lyrics are not only illuminates her personal evolution as an artist but also reflects broader cultural and societal trends that resonate with her audience.


To address this question, we will utilize word clouds and thematic analysis charts. A word cloud will serve as an intuitive visual representation of the most frequent words across Taylor Swift’s lyrics, with the size of each word proportional to its frequency. This visualization offers an immediate sense of the lyrical content’s emphasis, highlighting key words that recur in her songs. The word cloud’s visual appeal and simplicity make it an excellent tool for capturing the essence of Swift’s lyrical themes at a glance, offering insights into the subjects and emotions she most frequently explores.

Also, we will conduct a thematic analysis to categorize lyrics into distinct themes (e.g., love, heartbreak, empowerment, friendship) and visualize these findings through a bar chart. This approach allows for a more nuanced understanding of the thematic composition of Swift’s discography, showing not just the prevalence of certain words but the context in which they are used. The bar chart will rank themes by their frequency across her albums, providing a clear comparison of how different themes have been explored over time.


lyrics_data <- original_albums %>%
  select(track_name, lyrics) %>%

# Define additional stop words that are meaningless
custom_stop_words <-
all_stop_words <-
  bind_rows(tibble(word = custom_stop_words), stop_words)

# Preprocess the lyrics
clean_lyrics <- lyrics_data %>%
  unnest_tokens(word, lyric) %>%
  anti_join(all_stop_words, by = "word") %>%
  count(word, sort = TRUE) %>%
  filter(n > 30)  # Focus on words that appear more than 30 times

# Generate word cloud
ggplot(clean_lyrics, aes(
  label = word,
  size = n,
  color = word
)) +
  geom_text_wordcloud_area() +
  scale_size_area(max_size = 20) +
  scale_color_viridis_d() +
  theme_minimal() +
    legend.position = "none",
    plot.title = element_text(size = 20),
    plot.subtitle = element_text(size = 12)
  ) +
    title = "Word Cloud of Taylor Swift's Original Lyrics",
    subtitle = "Excluding 'Taylor’s Version' albums and some meaningless words",
    x = NULL,
    y = NULL

# Categorize lyrics into themes based on keywords
lyrics_data <- lyrics_data %>%
    theme = case_when(
      str_detect(lyric, "\\b(Love|Heart|Forever|Kiss|Darling)\\b") ~ "Love and Relationships",
      str_detect(lyric, "\\b(Fearless|Change|Dream|Brave)\\b") ~ "Growth and Self-Discovery",
      str_detect(lyric, "\\b(Reputation|Camera|Spotlight|Judge|Rumor)\\b") ~ "Fame and Public Scrutiny",
      str_detect(lyric, "\\b(Strong|Fight|Stand|Shake|Rise)\\b") ~ "Empowerment and Resilience",
      TRUE ~ "Other"

# Aggregate counts by theme
theme_counts <- lyrics_data %>%
  group_by(theme) %>%
  summarise(count = n()) %>%
  filter(theme != "Other")

# Visualize
ggplot(theme_counts, aes(
  x = reorder(theme, count),
  y = count,
  fill = theme
)) +
  geom_bar(stat = "identity") +
  labs(title = "Frequency of Themes in Taylor Swift's Lyrics",
       x = "Theme",
       y = "Count") +
  theme_minimal() +
  theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
  scale_fill_brewer(palette = "Pastel1")


From the word cloud, the most prominent words include “love,” “time,” “baby,” “wanna,” “red,” and “night.” These words suggest a strong focus on love and relationships, as well as an emphasis on time, which could signify the significance of moments and memories in her lyrics. The word “red,” which is quite prominent, may refer to one of her albums titled “Red,” and can also be associated with strong emotions that the color red typically represents such as love, passion, and anger. Additionally, the presence of words like “shake,” “stay,” “call,” and “talk” suggests themes of communication and interaction, which are common in songs about relationships and personal connections.

The bar chart depicting the frequency of themes in Taylor Swift’s lyrics further confirms the prominence of “Love and Relationships” as a theme, with a significantly higher count compared to other themes. This indicates that love and romantic narratives are central to her songwriting. The themes of “Empowerment and Resilience” and “Fame and Public Scrutiny” are also present, though to a lesser extent, reflecting elements of personal strength, overcoming challenges, and dealing with the pressures of fame in her lyrics. “Growth and Self-Discovery” appears to be the least explored theme, which could suggest that her music more often focuses on external relationships and experiences. But of course, since the thematic analysis here is based on our own defined set of theme keywords, there might be cases of omission or even misjudgment. A more precise thematic analysis would require an individual analysis of each piece of work.


Our presentation can be found here.