Last.fm Normaliser - a mashup with Musicbrainz

20 June 2007 | Matt Perdeaux |

After grumbling about the way last.fm calculates artist rankings, I realised that in the age of open data it shouldn't be too much hassle to knock together a little application to apply the normalisation calculation I discussed.

The application takes a last.fm username and recalculates the ranking based on an estimate of the amount of time you have spent listening to an artist, rather than the number of tracks played. It uses the excellent MusicBrainz web services to calculate an artist's average track length. Why not give it a whirl.

19 Comments

Jelle's GravatarHey,
Great initiative! Nice work!

Allow me to state the obvious, though: this average track length is not always representative. Joanna Newsom, for example, has one album with songs of normal lenght, and one with songs of ten minutes and longer. I listen to the first album most, so the songs I listen to aren't seven minutes of length in average.

But I assume you were already well aware of this. :)
Keep up the good work!
Jelle

20 Jun 2007 at 05:05 PM | Jelle

Matt Perdeaux's GravatarMany thanks. You're absolutely right - an average track length for an artist is a rough estimate at best, and at worst can skew the results quite badly. I guess some kind of standard deviation calculation might help - gonna have to dust off the old school maths text books! :)

21 Jun 2007 at 06:56 AM | Matt Perdeaux

onno's Gravatari guess the only way to really determine it is by using the actual track lengths and as you already stated, that will take some more bandwith :-)

but I like this stat you created!!!

22 Jun 2007 at 05:11 AM | onno

Monk's GravatarHello. Normalizer missed my top artist for some reason.

Here http://www.last.fm/user/Monkbel/charts/?charttype=overall&subtype=artist you can see that N.R.M. is my top artist. There is a lot of data on Musicbrainz here http://musicbrainz.org/artist/cde06aee-48b5-473d-8ddd-114addc05563.html

and still they didn't end in my Normalizer top artists at all!

should be a bug. :)

22 Jun 2007 at 06:39 AM | Monk

tim's GravatarCool idea and nice mashup, thanks :)

22 Jun 2007 at 08:14 AM | tim

Matt Perdeaux's GravatarMany thanks to you all for your kind words and encouragement. I'll be working to incorporate some of your suggestions over the weekend, and hope to have something live in the next few days. Watch this space.

22 Jun 2007 at 10:49 AM | Matt Perdeaux

John's GravatarThanks a lot for this, a very necessary and appreciated addition to last.fm!

22 Jun 2007 at 12:00 PM | John

cyclops79's GravatarFirst, great idea! :)

I now I'm repeating what others have said, but anyway...

Fantômas usually has really short songs. But they also have an album with only ONE song, 74 minutes long. This really screws up the average, and I don't think standard deviation would help a lot.

After the normalisation, they went up 36 places in my ranking. Maybe the track time would really be a better idea.

22 Jun 2007 at 01:02 PM | cyclops79

marcos's GravatarReally, great idea, as a fan of post-rock is great to see my favorite bands at the top of the chart, I only miss GY!BE, 'cause they are not in my top50 and would certainly be in the normalized version.
But (there is always a but, hehe), I would love a way to link directly to a normalized version of my charts.
Thanks!

22 Jun 2007 at 07:48 PM | marcos

cognate's GravatarPretty cool, but like an above commentator my top artist completely disappeared off the list! This makes no sense, as there should be adequate information about Harry Nilsson.

22 Jun 2007 at 09:44 PM | cognate

Ralph's GravatarYes! I didn't realise how unrealistic my original top artists list was until I normalized it. Much better.

23 Jun 2007 at 08:36 AM | Ralph

jesus2099's GravatarHi,

Your chart is nice !
But most of many of my top artists are unknown in Mb so they disapear…

23 Jun 2007 at 02:03 PM | jesus2099

Smasher/Devourer's GravatarGreen Carnation is another band whose average track length is hugely distorted by the presence of a single, epic-length track (60:06) in their catalog. As a simple fix, I recommend that you use the median track length rather than the mean. It still won't be accurate, of course, but it should eliminate the ability of a single outlier to throw off your measure of the average.

Nice work though. :)

23 Jun 2007 at 07:25 PM | Smasher/Devourer

J-ames's GravatarHow come I only get 34 artists on my charts but other people (namely my girlfriend) get the full 50. Makes me kinda sad cos I love this feature!

24 Jun 2007 at 03:11 PM | J-ames

Mike's GravatarNice work. My #1 artist according to your tool was listened to almost twice as much as anything else, but was only ranked #3 by the standard Last.fm algorithm. Great stuff.

And I was very surprised how quickly it runs.

24 Jun 2007 at 04:21 PM | Mike

Doug Orleans's GravatarGreat idea, but I get this error:

Parameter 2 of function RepeatString which is now -1 must be a non-negative integer

24 Jun 2007 at 06:09 PM | Doug Orleans

Sylvio's GravatarMy top artist doesn´t appear at the normalized chart. And it appears at Musicbrainz site perfectly with all their tracks!

24 Jun 2007 at 11:01 PM | Sylvio

harveydrone's GravatarThanks for this! Maybe a simple tweak would be to choose how much of each metric (# tracks vs minutes) to use in the ranking. So say, to rank artists by (X*minutes) + (Y*#tracks).

26 Jun 2007 at 01:33 PM | harveydrone

Matt Perdeaux's GravatarThanks for all your comments. I have just updated the application to use median track lengths, and will look at the other suggestions shortly. Once again, many thanks.

02 Jul 2007 at 12:47 PM | Matt Perdeaux


Add a comment

  Your name is required.
  Your email address is required.
        

  Please enter the answer in figures (type 12 NOT twelve).
 
  NB - We will not publish or disclose your email address to third parties. We require it so we can check you're not a nasty spambot, and so we can display your Gravatar if you have one. Apologies for the little arithmetic test, but we've been having terrible trouble with comment spam.

Latest blog entries

Blog archive

Categories


www.associativetrails.com