
Making Qlik sense of the music that you play
I really enjoy listening to music. And if people ask me what I listen to I most of the times struggle with a real solid answer. This is because of the diversity of artists that I like to play. And most of the times my answer will be “I listen to rock, blues and bluesrock for the most part”. But this isn’t a really great answer especially when you would be talking to someone who is also interested in music like me.
I would rather tell or show them some more specifics about it:
But before I visualized the data that I collected for this I didn’t even know the ins and outs for myself. Now I do!
Most of the time when I listen to music I use spotify. I think this app adds great value for the needs that I have. Next to spotify I use Last.fm to gather and collect the history of the tracks that I played at any time. This gives me the opportunity to aggregate all these tracks into insights that shows me what my listening behavior looks like. For this I used Qlik Sense. A totally free tool for loading and visualizing your data at hand.
Your question at this point might be: “How do I setup a tool like this for my own music to be visualized?”. I imagined that already 😉
Here we go.
Most of you might already be listening to music (this is a requirement for the next few steps ofc…) with a wide variety of clients or players. Last.fm offers a wide range of scrobblers (tools for sending your data to their platform). A list of scrobblers that you could use can be found here. What you’ll need to get what you want:
- An account at Last.fm. go to their website and click on ‘Join’ to create an account.
- A media player or add-in for scrobbler functionality, depending on the media player of choice you could have a look at google or documentation from Last.fm.
- If you have spotify, like me, you can add your Last.fm credentials in spotify at ‘Edit’ > ‘Preferences’ > ‘Activity Sharing’. Check the checkbox and punch in your username and password. This feature will handle uploading your history to your Last.fm account. Simple.
- Dropbox. You will need a dropbox account. In the next step I will explain how you will be able to gather your track history into a dropbox folder. first be sure to have an account at Dropbox.
- To be able to download your track history to your local computer, you will also need IFTTT. Ifttt will handle the automation of the downloads so you won’t have to do anything after setting this up.
- Using the IFTTT-recipe I created for handling the automated download everytime you listened to a track. This will create and download your tracks in a text file to your dropbox folder.
- Qlik Sense. You will need this to gain insight into your track history. Like the example above, I also will give away a pre-configured Qlik Sense application to get you up and running.
Now, when you completed all steps before this, you are almost ready for looking at your own music history. But before that you need to do the following:
- Download the Qlik Sense app that I preconfigured for you to get a quick start.
- Copy this app to your local Qlik Sense folder at: C:/Users/%USERPROFILE%/Documents/Qlik/Sense/Apps, just copy the link and paste it into your windows explorer window.
- Open Qlik Sense and open the app named ‘My Music’
Then click on the button for navigation:
And choose ‘Data load editor’.
The last thing you need to do is to change the folder where the IFTTT-recipe will download the text files. This can be done by editing the folder path to your dropbox folder where your music will be stored. (See image below)
After this you will be ready for loading your data, if there is any ;). If not, start listening to some music. You will see text files appearing in your dropbox folder. Load your history into the app by clicking on ‘Load data’. After that you will be able to see something like this:
Next thing for you to experiment with is answering some questions you didn’t know the answer to (yet):
- Do I listen to different artists over time?
- Which artists have the best albums to my opinion?
- Or you could search on keywords like ‘love’ or ‘rain’ for example to see what artists, albums and tracks belong to those queries 😉
The thing that I am missing with this data now, are the general properties of those tracks. I already have a method for enriching this data that we gathered with this post.
If you guys find this post interesting and get the results I was trying to achieve with this. I could also write a follow-up post which explains how to enrich this data with for example:
- The duration of the track
- The popularity of the track
- The year of release of the track
- And maybe some more…
Let me know if this is interesting for a next post.
For now, if you have any questions for getting this solution up and running, use the comments.
Otherwise have fun visualizing your music and telling or showing your friends what you actually like.
Patrick,
Thank you for this pleasant topic. I was able to get this running on my environment and I have some remarks.
– I had to install the IFTTT app on my iphone in order to startup the Personal Recipe. I was not able to start this up from the site.
– I also installed the Scrobbler app from Last.fm. Not sure if it is necessary.
– Scrobbling on spotify will ONLY work when connected to the internet. Disconnected mode is not supported yet, it is under investigation by Spotify (for more then a few years now …). So the music I listen to while driving to the A’dam office is not taken into account.
– On top of Spotifify , I was able to set this up for my Sonos environment at home (https://sonos.custhelp.com/app/answers/detail/a_id/811/~/last.fm-and-sonos#var_2)
Greetings,
Gregory
Gregory, thanks for your valuable feedback and additional information on how to get more out of this tutorial. Great!
Hi Patrick, thanks for this example. I directly started to create a QV app to retreive data from music played through my Sonos system. It’s nice to see wich music is played most and nice to create playlists from there.
I realy like to know/see how you could retreive more track information.
Greetings,
Marc
Marc, Nice to hear it is working fine for you. Any feedback on what info might be missing to make it a more smooth experience?
Somewhere in the near future I will post an additional post to this one explaining how to add more data from APIs to ‘blend’ with this subset of data. Stay tuned…
Hi Patrick,
the things I would like to see more is extra information about the song like Genre, Year of song, etc., etc.
Greatings,
Marc
Hi Patrick,
is your Music-Visualizing still working.
Im not sure if your IFTTT-recipe is still online.
Greatings Sigurd
Sigurd,
I don’t think so. Digital writings can sometimes get out-dated really fast. I now work mainly with data that is being sent to Last.fm. Here you’ll find an api that serves up multiple types of music related data included your own, if you created an account and linked that to your spotify one.