Have you ever wondered what kind of music you listen to the most? Or how much of your day is spent with music in the background? In this project, I will be using a combination of tools to collect and analyze my music data. Before I can start analyzing the data, I will need to clean it and collect additional data to add context. By analyzing my music data, I hope to gain a better understanding of my own music preferences and habits, as well as explore the potential effect it has on mood and productivity.
The first step was to identify a way to capture the music data. I needed a way to capture not only the music I was listening to directly but also indirectly. For this, I decided to use the Now Playing function on my Google Pixel with some automation from IFTTT. Now Playing is a built-in feature that can be turned on to always be listening for music and send out notifications for the currently playing song. This is a useful and neat tool, but it has Two major drawback: One it only captures about 75% to 65% of the music on its own. It has the hardest time capturing music if it's not particularly loud and if the Pixel is in my pocket (e.g. when shopping at a department store or mall). Two, there isn't a way to export or retrieve the data. To work around this, I decided to use IFTTT to log all notifications that the Pixel pushes in a Google Sheet. Once in the Google Sheet, I manually moved the data to a new sheet for cleaning and usage.
The data being inputted into the sheet was probably the cleanest data I could use for a project. Each entry had 4 components: DateTime, Notification, Song and Artist, and Category. The first step was to remove Notification and Category since they are not relevant to the project. Then, I split DateTime into separate Date and Time columns using the Split function. The same split function was used for Song and Artist.
While doing a spot check of the data, I realized that the Pixel was sometimes double-reading the song, creating a duplicate entry. To address this, a Duplicate Indicator was added, which would be set to true if the same song came up less than 2 minutes apart from each other. To make analytics easier, Day of the Week and Hour columns were also added.
During the data collection process of my music data, we were able to collect over 4200 data points. However, after cleaning and removing duplicates, we ended up with over 3000 true data points. The duplicate rate was higher than anticipated, with about 26% of the collected data being duplicates. It was interesting to observe that most of the duplicates occurred on weekends between 4pm and midnight, which makes sense because that was when I listened to the most music.
I looked at the most listened-to songs and artists. It was interesting to see that Dua Lipa was almost an outlier, having a 40% increase compared to the next most listened-to artist. This was due to two of her songs being in my top ten most listened-to songs.
Next, we looked at the frequency of artist and songs. This was because I am known to listen to songs on repeat sometimes or get into a groove where I only listen to one artist. Most songs and artists had a frequency of one, only being heard once, with a frequency of 10 and under being over 90% of the data for both songs and artists.
We then looked at the DateTime information and found that Friday, Saturday, and Sunday were the days that I listened to the most music, with an average of 40 songs logged on each of those days, while the other days had an average of around 30 song.
I made a heat map of my music listening habits throughout the week. The data showed that I listen to music consistently every day, with the most activity on weekends from 7 PM to midnight. I also listen to a significant amount of music on Tuesdays and Wednesdays in the afternoons.
From the heat map, it seems that music plays an important role in my daily routine. The consistent pattern of music consumption suggests that I rely on music to regulate my mood or energy levels throughout the day. Additionally, the peak in music consumption during the weekends in the evenings suggests that I use music as a way to relax and escape.
I plan to combine this data with information on song length and genre to better understand how I use music throughout the week and find ways to improve my habits.