Last.fm in time graphing tool

RSS
Condividi

Lug 29 2007, 15:07

Last.fm in Time

The idea
From time to time I like to code a little PHP and the other day I was looking at the audioscrobbler (the core, the data supply of last.fm) web services for interesting feeds and I saw the week chart feeds. I noticed that they provide a list of all available weeks and quickly realized that you could combine this with the Top50 feed to reconstruct older Top50's. Just subtract an artists play count from next week's total play count and you have the current total play count. And hey, if you can reconstruct old Top50's you can view how they developed and how your musical preferences developed!

Creating
So I went to work and produced code to perform different task. Collect the Top50, collect all week stats, compare the two and reconstruct a history. This was going goooood. Yeah. Then I took a pencil and made a drawing of what the chart should look like and I loved it. So I created the greatest spaghetti of variables I'd ever seen and uploaded the new script. It was just shock and awe! Except for a syntax error or two It all worked and the output was just as I'd hoped it'd be, except that... The 50 black lines in this tiny little graph were just such a mess, you could never make up what was what. Damn (that spaghetti again)!

Improving
I went back to work and added many features, a lot of color to the lines, auto scaling (1px = 1play), a legend in the color of the line and a line that connects the chart-line to the legend and a function to unclutter the legend for artist with the same or almost the same play count (which in turn made the lines harder to interpret but being able to read the legend outweighs clear lines :-P though I'm still looking to solve this...)

The stall
Some people already used the script (notably: C26000) since it's on my homepage, but I hadn't yet really sought any publicity since the script needs to load a lot of feeds and I was afraid of overloading the services. I wanted to implement some caching layer, but it seems like a lot of work and data to be stored. But now it's been a couple of months and I haven't really been programming at all, so I think I should just release it anyway. I've added a pause between collecting the individual feeds. This will lower the load, but makes generating the graphs very slow.

Showtime
Well, this is what it looks like. This graph is generated for me, it's compressed a bit along the axes and it goes back only 40 weeks and only for my top40, but the image would be to big to post here otherwise.

To generate your own, click the image and scroll down a bit to the form.

Further Thoughts
This still is a working project, so things might be broken from time to time, things might be added and changed. I'm still looking for ways to better unclutter the lines. One possibility is to go round the rainbow multiple times, but then I'd lose the association of colour and current position. Other suggestions are welcome. Also I'm going to add a white panel in the top left part of the chart with some additional information, since this area is mostly empty anyway. Furthermore dates instead of weeks-in-the-past-number might be nice for the x-axis and maybe different or user definable colour schemes might work better.

Finally
This is it so far. Still a lot to improve. Ideas and recommendations are welcome. Have fun!
Commenti accettati
Stats

Commenti

  • leoJP

    Hey man, this is a great little... program? app? uh.. thing :) Good luck with the future of this, will be checking back!

    Ago 9 2007, 1:30
  • avalyn2

    very cool, I like the rainbow colours, although I find it difficult to track which lines are which artist when the colours blend into one another, but nice to look at.

    Ago 15 2007, 23:53
  • norling

    Really nice job, great visualization of the stats. Thanks!

    Ago 19 2007, 18:34
  • snyde1

    Perhaps a logarithmic vertical scale would work better for those charts with wide banding of artists. Nice work.

    Ago 24 2007, 16:45
  • LANjackal

    Really really good tool. Added it to my L.fm and Facebook profiles :).

    Ott 6 2007, 19:44
  • LANjackal

    http://www.last.fm/user/LANjackal/journal/2007/10/6/542989/ thanks again :)

    Ott 6 2007, 21:02
  • Aioth

    That is amazing.

    Ott 16 2007, 13:11
  • SerialNumber

    It's damn cool, but I thought I'd report something that looks like a bug: Sydän, sydän appears as a straight line and the name as only Sydän, so I'd guess the comma is the problem.

    Nov 18 2007, 0:02
  • pcmadman

    Yes, that's a known problem.

    Nov 18 2007, 0:58
  • pcmadman

    It's fixed now.

    Dic 1 2007, 8:58
  • tannkrem

    wow! This is an amazing script/tool !! Something that would be very handy is that the artist's name would appear is you moved the mouse over then line that represents the plays.

    Gen 7 2008, 19:20
  • Kragey

    TOTALLY awesome; I've tried it two or three times. Thank you for the amazing tool.

    Feb 6 2008, 4:30
  • post-something

    Man, this is totally awesome! I keep using this. Thanks so much, and keep up trhe good work!

    Feb 14 2008, 11:56
  • or4n6e

    Cool chart! Did you try rotating the colors through the list rather than just one spectrum? It might be easier to read if the lines were, say, red-yellow-blue-red-yellow-blue rather than red-reddish yellow-yellow-yellowish blue-blue. Just to keep the similarly colored lines farther apart from each other.

    Apr 15 2008, 17:04
  • taeril

    ever thought of porting this to java ?

    Giu 23 2008, 12:27
  • taeril

    also, i think the weeks control is kind of broken.. it stops for some people at like 7 weeks when they last reset a year ago (not me)

    Giu 23 2008, 12:28
  • Bloopy

    This sounds really cool, but I guess it's broken at the moment: Failed inserting new weekstats. Quit to prevent shit from happening. Mysql said:Dubbele ingang '7701-32767' voor zoeksleutel 1 and query:INSERT INTO `mm2_weekstats` (`listid`, `artistid`, `plays`) VALUES ('7701', '36658', '6')

    Lug 23 2008, 2:21
  • Bloopy

    Now I just rediscovered this and it's working at the moment, great! It's a bit hard to distinguish where the lines go because of the similar colours though. It would be cool if it was interactive... eg. highlight a graph line when you mouse over an artist name.

    Giu 9 2009, 3:24
  • WinterWanderer

    Yeah, I thnk it's pretty cool but I wonder if it'd be easier to follow if the colours didn't change gradually but would go something like "red, dark blue, white, black, dark green, purple, orange, pink, grey, light blue, light green" and then start over. This way you wouldn't have as many bands with nearly the same colour all over each other.

    Gen 18 2011, 18:57
  • awfulgrace

    Love it!

    Feb 11 2012, 5:57
  • boutboulman

    Man I wish this worked properly or there was any piece of software out there that did the same thing.

    Lug 26 2012, 19:18
  • pcmadman

    It has suffered some bit-rot since I last worked on it in 2007, so I need to fix that. But then I want to do it right and I don't really have the time for that.

    Set 4 2012, 10:01
  • jmejay

    rip

    Feb 22 2014, 9:22
  • Klonki

    RIP perfect app. Pm me in future if this ever gets fixed

    Lug 2 2014, 17:16
  • Tecfan

    RIP

    Set 7 2014, 16:35
Visualizza tutti (26 commenti)
Aggiungi un commento. Accedi a Last.fm o registrati (è gratuito).