How my Spotify Music looks in PowerBI
3 min read
Music is life;
I love music, there's no single day that passes by that I don't listen to music, I need music, like right now, I'm listening to Kraftwerk's song The Robots, fantastic song and when I get to work and when I travel and when I have dinner at home, music is air for me.
I dream, sleep, eat, walk and work with music, not a genre in specific. I can be very varied in my taste, I do have a natural tendency in terms of popular music towards the 80's and 90's because I was a kid when Michael Jackson's Thriller came out.
Also, I do love Classical especially the Romantics and Soundtracks, for example, I've been listening to the Bladerunner soundtrack, fantastic.
In today's world, anyone can listen to anything on demand, gone are the days of buying the album, and having to wait for it, not today, anything is available on the spot. With the multiple services available: Pandora, Spotify, Apple Music, YouTube and many others.
The music service I use is Spotify and for the most part, I like it, some hassles here and there but it does good work. They provide a REST API to interact with the internals of their platform. More details of it, here.
As I was browsing their API I found that I can get the songs and genres I listen and I've listened to. I then came up with an idea! What if I picture my music data with PowerBI? How would it look?
Get User's Top Artists and Trackshere
curl -X GET "https://api.spotify.com/v1/me/top/artists?time_range=long_term&limit=50" -H "Accept: application/json" -H "Authorization: Bearer BQCsk6TFcNqCPZodC13lPp82G1kJ6MZz203PwGrbI1u
This is how it looks:
And certainly I needed to do some massaging of the data:
It outputs in JSON
Which I then converted to CSV
Which I then import into Excel for cleansing, removed the not necessary columns
And then Imported to PowerBI for visualising
Page 1. My historical listening patterns grouped by Genre with the corresponding Artist(s). My most listened genre is Alternative Dance with eleven artists, next are Adult Standards and Alternative Rock and so on.
Another important number is how high the artist is on my list, The Cocteau Twins is my #1 listened artist and Depeche Mode is number 2, etc. This data should go back all the way to when I started to use Spotify, back in May of 2012 when they launched the service in Australia.
Page 2. Grouped by Genre in alphabetical order, showing the artist(s) and their Spotify Ranking. In Alternative Dance which is my most listened genre.
Seeing this data confirms my music patterns that I practice every day automatically, having access to it and being able to create graphics out of it is fantastic.
There are other ways to create and show graphics with PowerBI. Like thes ones below:
Page 1: In Alphabetical Order
Page 2: In Alphabetical Order with a number in each square showing how popular the song was for me when I ran the report.
Page 3: In alphabetical order, showing: Number of songs I listened from that artist, how popular the artist is on my list and on Spotify
Page 4: Showing number of songs and each song with its popularity number both for me and on Spotify. Clearly two artists took the most listening Slowdive and Polo y Pan.