Last.fm Spring Graph. (Mouse over a circle to light up label.)
This sketch first loads a Last.fm user's top 50 artists, then connects them using artist similarity data. It then runs through every available week for that user's play data and adds those artists week by week. Once all the data has been loaded, the graph should settle down into a map with similar artists grouped together. Labels light up week by week to show a history of music listening over time. You can track your moods over time, or see how your tastes have changed, or see what music you listen to over and over.
Download the application. The application allows you to see data for several different Last.fm users at the same time.
Source code and notes. Processing and Java code free to tinker with as you like!
More About the Application
The applet above is a slimmed down version of the full application. The full version can show many users at once. You can see how your tastes overlap with someone else's. Here I can see that this guy and I share Stereolab as a favorite, but I listen to lots more jazz and it looks like he's more into female pop vocalists. There's a little peninsula of French pop that we share and he's likes someone I haven't heard before - maybe it's good!
The small, blue points are artist that are similar, but haven't been played by any user. Holding the mouse over them will light up their lable. A blue dot between two of your favorites might be someone you want to check out.
You can click on a square to change the user id, or click on the blank square to add a new user. Neighbors are users who Last.fm sees are listening to the same artists. It will fetch the top neighbors for all the users you are viewing. You can click on someone everyone has in common, or try to find an oddball.
There is no hard coded limit to the number of neighbors you can view, but it starts getting a little hairy at four. This drawing with three of my neighbors took about 20 minutes to do on a fairly new machine. For most groups of neighbors, you'll wind up with a large blob representing the reason they are neighbors. They'll all play a lot of music by thieir favorite artists and that's why Last.fm decided to make them neighbors. What becomes interesting are the peninsulas that grow off the blob - the unusual stuff that's fun to discover. Maybe there's one other person who's also listening to that weird Japanese pop that the rest of the group isn't in to and maybe they're listening to a similar artist you haven't heard of yet!
The application was written in Java (version 6 update 7) and should run on any platform that supports Java. It fetches lots of data from Last.fm which limits queries to 1 a second. There's also an amazing ammount of math involved in laying out the points, so some pauses are normal especally for more than two users. If performance seems really bad, you might benefit from the latest version of Java.
Written by Andrew P. E. Collins - Albuquerque, New Mexico, USA. August, 2008 [ AtomBoy :: swcp . com ]
Updated December 2008 to use Processing 1.01 for a signifigant performace bump.
Updated April 2010 to use Processing 1.1 and to fix a change in the way LastFM encodes similarity values.