[Skip To Content]


# pretty last.fm graphs

lastgraph, carldr-style

Have you seen Lastgraph or Lee Byron’s work? Like it? Upset you can’t see the source code and play with it? Well, this might be what you’re after.

Utilising the scrobbler gem, I’ve written some Ruby which does something similar, and here’s the code so you can play with it yourself.

Just change the username on line 100, and run it. The script will download your data from last.fm, and produce a nice .svg for you (Warning: quite large.) To be friendly to last.fm, it caches the data on disk, so subsequent runs are generated a little quicker than your first run.

If you want to hack around with it, then I warn you that the second half of the source code is nasty, but subsequent versions will be tidier. It should be fairly easy to work out and modify. The code is released into the public domain, do as you please with it.

I’m sure some of the calculations in the code are inadvertently tailored to accounts with a similar amount of data as mine, so I’d be interested to hear if anyone does have any success with it. Email me via the link at the bottom of the page.

# flags of the world as piecharts

Colours of the United Kingdom flag as a pie chart Colours of the South Korean flag as a pie chart Colours of the Mauritius flag as a pie chart Colours of the Niuean flag as a pie chart

Via. Each sector of these piecharts is proportional to the area of the colour on the respective flag. Turns out Pacman is hidden in the Niuean flag.