Spotifyr is a package that allows you to interact with Spotify data. This data can be anything between specific features of audio tracks to specific user preferences and playlists
I wanted to look at some of my favorite artists and see the specific attributes of their tracks and albums. Before getting into the data there is a little bit of setup. Getting a few packages and Authorization is all you need to get going.
As long as you know the name of the artist that you are looking for you can easily get the features of all their tracks. By using the get_artist_audio_features() function you can down to analyzing some of your favorite songs!
I have quite a diverse taste in music, but my favorite band is the Goo Goo Dolls. They always have a song to pick me up and get me into a good mood. They are all originally from my hometown of Buffalo, NY and have been making great music for over 30 years.
Goo_Goo_Dolls <- get_artist_audio_features("the goo goo dolls")
The first thing I wanted to see from them is what kind of features there were about my favorite song by them because I didn’t like their new version that came out recently. I encourage you to listen, but I will warn it is a song that is my favorite because of its sentimental meaning to me. I included several variables to see all the differences between the new and original version.
Goo_Goo_Dolls %>%
filter(track_name == "Better Days") %>%
select(track_name, album_release_year, album_name, valence, liveness, key, key_name, key_mode)
## track_name album_release_year album_name valence liveness key
## 1 Better Days 2020 It's Christmas All Over 0.249 0.0945 2
## 2 Better Days 2006 Let Love In 0.331 0.0953 7
## key_name key_mode
## 1 D D major
## 2 G G major
I’ve listened to the original song probably more than anyone so I noticed a difference between the new and original version. The song was too slow for me on the Christmas Album. Valence is best translated into non-music terms as how happy the song is. The difference in versions is reflected in valence and liveness. They also changed the key of the song.
Seeing the change from G major to D major made me curious about what key modes they use the most in their music. They have all different types of songs so I’m curious if they really have a favorite or not.
## key_mode n
## 1 G major 32
## 2 C major 29
## 3 D major 29
## 4 A major 26
## 5 E major 25
The switch from G major to C major makes sense because they are the two key modes that they use the most. It is interesting to see how there are many other key modes that are not far behind. I think that this speaks to the range of the band.
I mentioned how they always seem to get me in a good mood. Some of my favorite tunes include Iris, Broadway, Slide, and Smash. I am curious to see what their top songs are for attributes like energy and danceability. Daceability is not a term that I use frequently, but it makes sense that Spotify uses it.
## track_name energy danceability album_release_year
## 1 Tucked Away - Live Version 0.997 0.361 2004
## 2 Slave Girl 0.996 0.525 1995
## 3 Slave Girl 0.995 0.512 2008
## 4 Slave Girl - 2015 Remaster 0.994 0.539 1995
## 5 What a Scene - Live 0.992 0.448 2004
## 6 Sunshine Of Your Love 0.991 0.301 1987
## 7 Smash - Live 0.990 0.336 2004
## 8 January Friend - Live 0.990 0.177 2004
## 9 Wait for the Blackout 0.989 0.253 2008
## 10 Dizzy - Live 0.989 0.430 2004
I was very surprised to see that only one of my favorite tracks was in the top 10 for energy. I want to see what the top 10 for danceability looks like because it doesn’t seem to have a direct correlation to energy in the table.
## track_name danceability album_release_year
## 1 Fearless 0.681 2019
## 2 Flood (feat. Sydney Sierota) 0.669 2016
## 3 Money, Fame & Fortune 0.655 2019
## 4 Long Way Home 0.652 2016
## 5 Iris - Demo 0.644 2008
## 6 22 Seconds 0.644 1990
## 7 Lucky One 0.630 2016
## 8 So Alive 0.620 2016
## 9 James Dean 0.615 1989
## 10 Step in Line 0.602 2019
Iris is one of my favorites and one of their better known songs. I think that it makes sense that is considered danceable.
One big conclusion that I can take from this analysis of my favorite band is that maybe I need to give some of their new stuff another chance. I tend to be set in my ways and listen to their hits. Yet, after working with all of their song data I may need to revisit some tracks.