As I am writing this the first day of dashboard week is almost over. Every morning this week us data schoolers are given a new data set and are given the task to create a dashboard and write a blog about it by the end of the day. It’s going to be hectic, but also a great exercise in working efficiently under time-pressure by prioritizing and timeboxing activities.
For the first day we were asked to download and visualise Spotify streaming data using Spotify’s Web API (add link). I love music so I thought this would be a fun and interesting challenge to work with. After spending some time looking at what data it was possible to download, I decided I wanted to look at how the music taste has changed throughout history. The Spotify API makes it possible to download Audio Features (danceability, energy, tempo) of each track so I thought it would be fun to investigate have these have changed over time.
Downloading the data
I started by looking through Spotify for a historical playlist and found a playlist with the most streamed songs over the last decade. I created a workflow in Alteryx to download all the tracks from this playlist. This data included trackID, song name, artist, album, popularity, and other general song info. Please see the screenshot below.
The next step was to download the audio features for each of these songs. I used the trackIDs from the first workflow and made another API call to download audio features. Please see the screenshot of the workflow below.
After this was done, I joined the song info data and the audio feature data together. I also performed some cleaning/data prep and transforming and outputted this to a hyper file so I could start visualising the data in Tableau.
Visualising the data
For the visualisation part, I started by creating a list of what I wanted the visualisation to show, followed by a draft of the dashboard on paper. I decided that I wanted my viz to have the following elements:
- Chart with the change in the audio features over time
- Chart ranking the songs by popularity and audio features
- A chart to compare the audio features of a selected song the average of all other songs
I started by creating some initial dashboards which you can see below.
After a couple of hours of hard work and many iterations, I ended up with the dashboard as shown below. To view it in Tableau Publick, click here. It is fully interactive, and you can filter on audio features by your choosing. By clicking on a song in the top 10 list to the left, you can compare its audio features to the other popular songs of this decade. The bottom line-chart shows the change in audio features (e.g. danceability) over time. By clicking on a year, the most popular song for that year pops up in a window below. In the future, I would like to add more songs over a longer time period, e.g. look at billboard songs since 1960s, as I assume the change would be more significant than for the last decade.
Overall I found this day very challenging and fun and I’m looking forward to the rest of the week!