Exploring My Spotify Data

Every year (since 2015) Spotify has had its Wrapped campaign where each December they release information regarding your listening habits over the last year. It started as just a simple site showing users their top songs and genres and over the years they have been adding to the data they show users. In 2019 they also added a review of the last decade. This has resulted in a huge increase in Spotify usage. More than 60 million users interacted with Spotify Wrapped last year alone. You can read more here.

Recently, I discovered that Spotify allows you to download a years worth of your own data. This data includes your streaming history, playlists, search queries, library, artists you follow, etc.

Now, even though it’s November and Spotify will be out with my year in review in about a month, I’m a data scientist now. Since I’m now a data scientist I decided to do some basic data exploration on this data set to see if I could gain any insight into my own listening habits.

I present my results using the functions I eventually wrote so that you can easily use them for analyzing your own data. You can read how to download your own data here.

Import Libraries & Read in Data

First I need to read in my Spotify streaming data. This was supplied in 3 separate JSON files so I’ll need to combine them into a single data frame for analysis.

png

The streaming data gives you the time you ended listening to the track, track artist, name of the track, and milliseconds you played the track for. We’ll be repeating some analysis here so I’ve included a little library of functions that I’ll use to perform some of the data exploration.

Let’s see how many tracks I listened to this last year.

Wow, 27,559 tracks! I wonder how much time that is?

This is in milliseconds. Not a super insightful unit of time. Let’s convert this to more conventional units of time. We’ll write a basic function to do this for us since we’ll want to see time spent listening to subsets of the data. This function was written based on a post on Stack Overflow and results were verified here.

I knew I listened to a lot of music, but over 53 days worth?! 🤯

Top 10s for the Year

Now let’s dive into some specifics. What were the top 10 artists I listened to this last year?

png

In terms of listening to individual tracks I’ve listened to more from Falling in Reverse. This is interesting since this is a band I discovered at the beginning of 2020. I wonder why and when I exactly started listening to them? When do they first appear in my streaming history?

png

Ah, I remember now! This song appeared in a playlist I follow called “Rock This”. I loved this single and wanted to hear more from the artist. I wonder what the top tracks I listened to from each of these artists were?

png

I wonder how different these tracks are from my top tracks overall?

png

I wonder what my top artists look like in terms of time and not just number of tracks I’ve listened to?

png

Honestly, not that much of a difference here. A few artists pop up here instead simply because of certain albums I have listened to over and over again. I wonder how this list of artists compares to my top artists by track count?

png

Top 10s for Specified Periods

Next, I wanted to get more detailed information about my listening habits for certain periods of time. Since 2020 has been such a weird year (both in terms of what is going on in the world and in my personal life). Let’s see what I was listening to most at the beginning of 2020.

png

Interesting. Looks like I was listening to a lot of blues at the beginning of the year in terms of tracks. It looks like Eminem dominated my listening after to his album “Music to be Murdered By”. Let’s see how I was doing during the first 6 weeks of the pandemic.

png

Interesting. A lot more pop punk in the mix. Usually I listen to this type of music to pull me out of feeling down so I suppose that makes sense. My track list is a little more interesting. Here I see a bunch of songs that have a lot more to do with love than I normally listen to. I wonder what was going on with me around that time? (No more comment on that observation here 😉)

Conclusions

There is so much more to explore in this data. If you’re like me, examining your listening habits can give an interesting insight into what your year was like at any given point. There is still a lot left to explore. I have yet to dive into analyzing my playlist data or my search queries so there will be more to come soon!

Mathematician & Data Scientist in the Boston area.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store