Last.fm in time graphing tool

RSS
Partager

29 jui. 2007, 15h07m

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!
Envois approuvés
Stats

Commentaires

  • leoJP

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

    9 août 2007, 1h30m
  • 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.

    15 août 2007, 23h53m
  • norling

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

    19 août 2007, 18h34m
  • snyde1

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

    24 août 2007, 16h45m
  • LANjackal

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

    6 oct. 2007, 19h44m
  • LANjackal

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

    6 oct. 2007, 21h02m
  • Aioth

    That is amazing.

    16 oct. 2007, 13h11m
  • 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.

    18 nov. 2007, 0h02m
  • pcmadman

    Yes, that's a known problem.

    18 nov. 2007, 0h58m
  • pcmadman

    It's fixed now.

    1 déc. 2007, 8h58m
  • 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.

    7 jan. 2008, 19h20m
  • Kragey

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

    6 fév. 2008, 4h30m
  • post-something

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

    14 fév. 2008, 11h56m
  • 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.

    15 avr. 2008, 17h04m
  • taeril

    ever thought of porting this to java ?

    23 juin 2008, 12h27m
  • 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)

    23 juin 2008, 12h28m
  • 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')

    23 jui. 2008, 2h21m
  • 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.

    9 juin 2009, 3h24m
  • 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.

    18 jan. 2011, 18h57m
  • awfulgrace

    Love it!

    11 fév. 2012, 5h57m
  • boutboulman

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

    26 jui. 2012, 19h18m
  • 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.

    4 sept. 2012, 10h01m
  • jmejay

    rip

    22 fév. 2014, 9h22m
  • Klonki

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

    2 jui. 2014, 17h16m
  • Tecfan

    RIP

    7 sept. 2014, 16h35m
Voir les 26 commentaires
Ajouter un commentaire. Connectez-vous à Last.fm ou inscrivez-vous (c'est gratuit).