mustalgia.me

Nostalgia-powered Last.fm music listening insights.

January 7, 2022

mustalgia.me

Nostalgia-powered Last.fm music listening insights.

Published: January 7, 2022, Last updated: January 9, 2022.

Nostalgia, n:

A sentimental longing or wistful affection for a period in the past.

Update January 9, 2022: I’m stoked by all the attention this received after I posted it to Reddit! I apologise to anyone who tried to access it but had issues; this was my first time making a public-facing dynamic website. However, it seems most of the issues were simply due to demand, and there’s only so much my humble self-hosted server can handle and that I can develop over the holidays. I could have reasonably anticipated this if I’d realised that Last.fm users (or, at least the ones that use the subreddit) tend to have a lot more scrobbles than me!

I’ll be slowly incorporating feedback into the tool when I find the time, so please raise an issue if you find one, or send me an email if you don’t use GitHub.

Intro

For all its issues, Last.fm is the best way to keep a record of the music that you listen to. For data tracking nerds like myself, recording my music listening history is a no-brainer. What does suck, though, is that there is no easy way to explore this data in any meaningful way. During my Christmas break, I tried to do something about this.

Last.fm listening insights

Last.fm tracks the music you listen to really well. A logical next step would be to use the data to provide listening recommendations and insights. The classic Last.fm insights are the Top Artists and Top Albums grids, which can be customised on a user’s profile to cover anywhere from the last 7 to 365 days of scrobbles (a scrobble is a record of a track that was listened to). It also generates Listening Reports, providing weekly/monthly/yearly insights such as the top artists, number of scrobbles, ratio of new to existing artists, and what time of day you listen to music the most. These insights are interesting in that they reflect the behaviour of the user, but they don’t do much in the way of improving your enjoyment of music.

Figure 1: My Top Artists and Top Albums of the past year.

Aside from this, Last.fm also tries to do other things, like provide recommendations. It is not very good at this (See Fig. 2). Comically, here is someone asking for music recommendations on the Last.fm subreddit using a collage of their Top Albums that was generated using a 3rd party website.1

Figure 2: Last.fm tries to recommend me music.

Last.fm also tries to be things that it shouldn’t, like a social network. There is no obvious way to connect with people (See Fig. 3), connections are unidirectional, and you’d be forgiven for thinking that the messaging system was reserved for bots.

Figure 3: The most obvious way to make new connections is in the 10th tab in the user profile page.

What I’m missing from Last.fm

Before the days of Spotify, I would listen to music on the desktop using Winamp or Foobar2000. I would arrange the view as to browse the music by cover-art. It was great since it helped me remember the music I had listened to over the years. I could look at each album and select one based on my mood at the time. These media players also recorded play counts which was useful for seeing which Albums and Artists I listened to the most. This is similar to Cover Flow from iTunes.

Figure 4: Cover art view in Foobar2000 (source: Reddit).
Figure 5: Cover Flow in iTunes.

Since switching to listening through Spotify, I no longer ‘browse’ for music in the same way that I used to. Instead, I am either motivated to listen to a particular genre, from which point I’ll use my memory to recall which artists I like the most and select an album from there. Crucially, however, sometimes I come across a reference to an album that I recall having listened to or enjoyed in the past, but that I had somehow forgotten. This prompts me to spin up the album again and triggers something of a nostalgia for the enjoyment I had for it in the past.

Other times, I recalled a time where I was obsessed with a particular album, but without being able to browse for it in my Cover Art view I could not easily find it and play it again. In such cases, I would have to resort to digging through my Last.fm scrobble history to see what music I was listening to in approximately that year, and just look for it until I happened to stumble upon it. In this way, Last.fm is acting like an old photo book, and in it, I am searching for an old photo. Of course, the photo book is an inefficient interface for browsing memories, page by agnoising page.

Last.fm should make it impossible to forget things like this, since all the data is there, it just needs to be presented in a way that is easier to consume.

Mustalgia.me

Of course, photo books have since been superseded by photo gallery apps on phones and desktops. In this way, mustalgia.me is to Last.fm what your Photos app is to an old photo book.

mustalgia.me uses the Last.fm API to generate insights into the listening history of Last.fm users. Much like the photo app on your smartphone reminds you of memories, mustalgia.me analyses your listening history to trigger your nostalgia. This is done by providing various insights into your past and present listening habits, and hopefully reminding you of some artists and albums that you may want to consider revisiting.

mustalgia.me goes far beyond Last.fm to present interesting insights into your listening habits. These insights are described below.

Implementation

Many of these listening insights are quite trivial to implement using pandas in Python. I’ll briefly describe the implementation of each insight below.

The remaining insights use a timeseries generated for each unique album and artist in the user’s data.

Try it out!

My listening insights can be viewed at https://mustalgia.me/user/adjrian, and you can give it a go yourself by heading to https://mustalgia.me. If you do try it, please let me know what you think. I’d love to hear suggestions for ways that it could be improved.

If you’d like to view the code, it can be found on my GitHub here.


  1. I didn’t go out of my way to find these examples. It’s been months since I can recall the recommendations of the Last.fm homepage working, and that user asking for recommendations on Reddit was one of many. Fellow Last.fm users will empathise.↩︎