Author
Published

Thursday, May 9, 2024

I’m remarkably excited to announce the release of taylor 3.1.0. taylor provides data on Taylor Swift’s discography, including lyrics from Genius and song characteristics from Spotify.

You can install the updated version from CRAN with:

This blog post will highlight the major changes in this release, including the addition of data from THE TORTURED POETS DEPARTMENT.

Who uses typewriters, anyway?

The primary update is the addition of data from THE TORTURED POETS DEPARTMENT (TTPD). You can now find Spotify data and lyrics for all 31 songs in taylor_all_songs.

library(tidyverse)

taylor_all_songs %>% 
  filter(album_name == "THE TORTURED POETS DEPARTMENT")
#> # A tibble: 31 × 29
#>    album_name       ep    album_release track_number track_name artist featuring
#>    <chr>            <lgl> <date>               <int> <chr>      <chr>  <chr>    
#>  1 THE TORTURED PO… FALSE 2024-04-19               1 Fortnight  Taylo… Post Mal…
#>  2 THE TORTURED PO… FALSE 2024-04-19               2 The Tortu… Taylo… <NA>     
#>  3 THE TORTURED PO… FALSE 2024-04-19               3 My Boy On… Taylo… <NA>     
#>  4 THE TORTURED PO… FALSE 2024-04-19               4 Down Bad   Taylo… <NA>     
#>  5 THE TORTURED PO… FALSE 2024-04-19               5 So Long, … Taylo… <NA>     
#>  6 THE TORTURED PO… FALSE 2024-04-19               6 But Daddy… Taylo… <NA>     
#>  7 THE TORTURED PO… FALSE 2024-04-19               7 Fresh Out… Taylo… <NA>     
#>  8 THE TORTURED PO… FALSE 2024-04-19               8 Florida!!! Taylo… Florence…
#>  9 THE TORTURED PO… FALSE 2024-04-19               9 Guilty As… Taylo… <NA>     
#> 10 THE TORTURED PO… FALSE 2024-04-19              10 Who's Afr… Taylo… <NA>     
#> # ℹ 21 more rows
#> # ℹ 22 more variables: bonus_track <lgl>, promotional_release <date>,
#> #   single_release <date>, track_release <date>, danceability <dbl>,
#> #   energy <dbl>, key <int>, loudness <dbl>, mode <int>, speechiness <dbl>,
#> #   acousticness <dbl>, instrumentalness <dbl>, liveness <dbl>, valence <dbl>,
#> #   tempo <dbl>, time_signature <int>, duration_ms <int>, explicit <lgl>,
#> #   key_name <chr>, mode_name <chr>, key_mode <chr>, lyrics <list>

TTPD has also been added to taylor_albums. However, Metacritic is currently undergoing some updates, and therefore user scores are currently disabled for albums. Thus, only the critic composite score is available for 1989 (Taylor’s Version) and TTPD.

taylor_albums
#> # A tibble: 17 × 5
#>    album_name                    ep    album_release metacritic_score user_score
#>    <chr>                         <lgl> <date>                   <int>      <dbl>
#>  1 Taylor Swift                  FALSE 2006-10-24                  67        8.4
#>  2 The Taylor Swift Holiday Col… TRUE  2007-10-14                  NA       NA  
#>  3 Beautiful Eyes                TRUE  2008-07-15                  NA       NA  
#>  4 Fearless                      FALSE 2008-11-11                  73        8.4
#>  5 Speak Now                     FALSE 2010-10-25                  77        8.6
#>  6 Red                           FALSE 2012-10-22                  77        8.6
#>  7 1989                          FALSE 2014-10-27                  76        8.3
#>  8 reputation                    FALSE 2017-11-10                  71        8.3
#>  9 Lover                         FALSE 2019-08-23                  79        8.4
#> 10 folklore                      FALSE 2020-07-24                  88        9  
#> 11 evermore                      FALSE 2020-12-11                  85        8.9
#> 12 Fearless (Taylor's Version)   FALSE 2021-04-09                  82        8.9
#> 13 Red (Taylor's Version)        FALSE 2021-11-12                  91        8.9
#> 14 Midnights                     FALSE 2022-10-21                  85        8.3
#> 15 Speak Now (Taylor's Version)  FALSE 2023-07-07                  81        9.2
#> 16 1989 (Taylor's Version)       FALSE 2023-10-27                  90       NA  
#> 17 THE TORTURED POETS DEPARTMENT FALSE 2024-04-19                  76       NA

Finally, a new color palette inspired by the TTPD aesthetic has been added to the album_palettes, and the package website has been updated with a new theme and logo, also inspired by the album cover.

The five colors of the TTPD color palette. The hexadecimal codes are #1C160F, #3F3824, #635B3A, #ADA795, and #F7F4F0
Figure 1

This palette can be used inside any of the scale_*_taylor_*() functions.

taylor_album_songs %>% 
  filter(album_name == "THE TORTURED POETS DEPARTMENT", !is.na(energy)) %>% 
  mutate(track_name = fct_inorder(track_name)) %>% 
  ggplot(aes(x = energy, y = fct_rev(track_name))) +
  geom_col(aes(fill = track_name), show.legend = FALSE) +
  scale_fill_taylor_d(album = "THE TORTURED POETS DEPARTMENT") +
  labs(x = "Song Energy (From Spotify)", y = NULL)
A horizontal bar graph showing track names on the y-axis and song energey on the x-axis. Bars a filled with colors derived from the TTPD color palette, ranging from a light grey to black.
Figure 2

Minor Changes

There were also a number of minor improvements:

For a complete list of changes, check out the changelog.

Acknowledgments

Featured photo by Katrin Hauf on Unsplash.