TheoGB.com
 

The Last.fm Stats Page

Last.FM's a great source of listening statistics but the site and API don't make it easy to really get the important data.

For the purposes of the end of year album top 10 I really wanted to get a sense of complete album play equivalent. Last does list your top albums but because it's based purely on plays of tracks, albums with more tracks are disproportionately rated higher compared to those with fewer.

Naturally the way to resolve this is to divide by the number of tracks, a statistic that Last also stores, but which is frequently wrong. (One site dedicated to doing this actually uses the running time of the album to normalise, which is clever but would be harder for me to validate.)

The final important value is the year of release because we're only interested in this year's albums. Again, Last's data is frequently wrong. I think the issue is muddied by so many different versions of albums as people tag them plus some have bonus tracks, different release dates in different territories,  etc. I found the Discogs site to be invaluable for finding the right data.


The 2012 Method

For 2012 data I was simply using Last.FM's standard feed for top albums, adding each album to the db and then retrieving the number of tracks and release year from Last via a separate call. In the back end I had a method to combine multiple albums as a single correct release for my calculations. I also had a page allowing you to update the values on each album, up to 20 at a time, so as to keep the data right. I even built in a Google and a Discogs search link for that title to make it easy to find the correct information.
Theogb.com last.fm data.png

The downside here was that the top albums thing will only return the last 3, 6, 9 or 12 months, so I had to recollect that entire stat block every time, and the only day I could be sure I had purely 2012 stats for the entire year was on 31st December 2012.

(Obviously I kept my internal album data, and the Last album links, it was just the playcount stats I had to blow awat and re acquire. )


The 2013 Method

For this year I needed to improve my system, so that I could just keep adding stats to the existing values. To that end I started pulling in my data track by track, from the complete play feeds. Again, Last sought to make my job harder, this time by making sure that the final page of results for the date period you grab just repeats over and over, so necessitating I build in a special comparison.

However,  now at least we have a view by person, by listening year, showing what's been heard.