← WorkClient record

Associative Trails / work

Last.fm Normaliser

A little application to rank your favourite artists and albums by an estimation of how long you have spent listening to them.

ClientAssociative Trails
TypeWeb application
OverviewArtist charts ranked by listening time, not track count

The first version of the Normaliser was launched in June 2007, and immediately got a bit of coverage on influential blogs, which brought it a decent amount of traffic.

After two years of solid service, we rebuilt the application from scratch using open-source technologies and refreshed the design.

01Listening charts that count tracks, not time

The challenge

Having been a user of last.fm for a number of years, I often found it frustrating that my listening charts didn't accurately reflect my listening habits. The problem was that last.fm uses the "track" as the atomic unit of attention - and last.fm's listening charts are sorted based on how many tracks you have listened to by a particular artist.

This approach can throw up some problems. For instance, some artists tend to record shorter tracks than others. For instance, spending an hour listening to Arctic Monkeys will probably log twice as many tracks as the same time spent listening to Pink Floyd.

02A small app built on open data from last.fm and MusicBrainz

The solution

After grumbling at length in a blog post, I realised that in the age of open data it shouldn't be too much hassle to knock together a little app to apply the "normalisation" calculation I discussed. The resulting application does the following:

  1. Takes a last.fm username and grabs the XML list of top 50 artists/albums;
  2. Goes through those artists and grabs album and track data for them from the MusicBrainz web service;
  3. Calculates the median track duration for each artist, using it to estimate how much time spent listening to the artist;
  4. Sorts the artist list by estimated time.

The resulting table shows top artists ranked based on the estimated time spent listening to them.

Feature index — six plates01 / 06
Screenshot of the Normalisr homepage: a dark hero panel with a form to enter a last.fm username and choose a chart type, above an explanation of how the tool works.
PLATE 01 Users enter their last.fm username to generate a chart ranking artists by estimated listening time rather than track count.
03Launched in 2007, rebuilt after two years of service

The outcome

The first version of the Normaliser was launched in June 2007, and immediately got a bit of coverage on influential blogs, which brought it a decent amount of traffic. After two years of solid service, we rebuilt the application from scratch using open-source technologies and refreshed the design.

We are regularly adding new functionality, including graphical widgets allowing users to display their normalised charts on their own websites and blogs.

In November 2009, we started a small collaboration with the Music Technology Group at the Universitat Pompeu Fabra (Barcelona, Spain).

TechnologiesWhat the system is built from
Technologies used
Python, Django, MySQL, RSS, XHTML 1.0 Strict, CSS, RSS, jQuery, Google Chart API. Ubuntu, Apache, WSGI, Nginx, Munin, Monit.