Слушать через Spotify Слушать через YouTube
Перейти на видео YouTube

Загрузка проигрывателя...

Скробблишь из Spotify?

Подключи свой аккаунт Spotify к аккаунту Last.fm и регистрируй все, что ты слушаешь в приложениях Spotify на всех устройствах и платформах.

Подключиться к Spotify

Отклонить

Надоела реклама? Стань подписчиком

Last.fm in time graphing tool

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.http://img.bit-byters.net/grapher.png

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!

Надоела реклама? Стань подписчиком

API Calls