Never Mind The Royals

Friday, 6 May 2011
by andrew
filed under Trends and Data and Found On Last.fm
Comments: 9

Last Friday, 29th of April, was a big day for Prince William and Kate Middleton, and a great excuse for a party for the rest of us… We even set up a special radio station for the big day. But we spotted a bit of an oddity in the scrobbling logs. Not everyone, it seems, was caught up in the wave of patriotic royalism that swept Britain that weekend.

Sitting at number 84 in the UK chart for that day was the Sex Pistols‘ anarchist anthem, God Save The Queen.

About 1 in every thousand listeners in Britain scrobble God Save The Queen on a typical day (not counting Last.fm radio listens), which isn’t bad going. But on the day of the Royal Wedding it hit nearly five times that, far more than on any other day in the last 12 months.

Originally released in 1977 for the Queen’s silver jubilee, the track was banned by the BBC and other broadcasters for its incendiary lyrics, but shot to the top of the charts nonetheless.

Even in 2011, with Sid Vicious long since departed and Jonny Rotten making TV ads for butter, the song has kept its angry appeal — as the chart above shows.

So here’s to our listeners for keeping the punk spirit alive — we mean it, maaaaaaan.

Artist Artist

Wednesday, 13 October 2010
by cms
filed under Found On Last.fm and Code
Comments: 32

Hello people. I’m cms, and my job here at Last.fm is looking after the databases. Much of the time I’m involved with operational running of database servers, designing and optimising SQL queries, and scaling work on our relational database clusters. Every now and then though, I do get an opportunity to poke around in the Last.fm dataset and explore some of the interesting relations.

I recently re-discovered the seminal album ‘Spirit Of Eden’ by ‘Talk Talk’ (haven’t tried it? You really should, it’s magical), and I’d been giving it quite heavy rotation. This prompted a comment on my profile by one of our lovely users, who suggested making a playlist from artists whose names consisted of repeating word patterns. This idea appealed to me, but off the top of my head I could only come up with a paltry half-dozen candidates. Surely there were many, many more. If only there was some kind of database nearby I could query…

We keep our main catalogue data in a PostgreSQL database. PostgreSQL has a nice set of extended string operators, including quite comprehensive regular expressions support, which would be useful for an ad-hoc query like this.

Here’s what I came up with initially off the top of my head

select name from artist where name ~* E'^(\\w+\\M)\\s+\\y\\1$' ;

Using the case insensitive regular expression match operator ~* and matching against a string that begins with a sequence of word characters leading up to a word boundary, which I’m capturing as a group, then a sequence of whitespace, then the start of a word boundary followed by the original captured match.

This query worked really well at defining the pattern for repeating names. I was matching well over 10,000 distinct strings. The problem was that we store all the submitted data for artists, and this includes data from a broad range of unverifiable sources. I was getting lots of great artist names in my set, but many of them were bogus; typos, mis-taggings, spelling corrections, and that was just the obvious mistakes.

I needed to come up with a way of filtering the set further. My first iteration was to use track information. Incorrect artist attributions seemed unlikely to have relations over tracks in the catalogue, and I could extend my query relatively easily to take account of prolificness like so.

select count(1), a.name from artist a, track t where a.name ~* E'^(\\w+\\M)\\s+\\y\\1$' and t.artist = a.id group by 2 order by 1 desc;

This got me a shorter set of artists (8000 odd), with some ordering. I could see that recognisable artist names (hello Duran Duran !) were sorting towards the top. However, ordering by catalogue volume still wasn’t quite right. Ideally I needed some kind of popularity weighting. Unfortunately we don’t store any scrobble data in the PostgreSQL catalogue schemas.

However we do store scrobbles, alongside exported catalogue information in our Hadoop cluster. Although I have been known to write Java code in the past, I’m mildly allergic to it. Luckily for me we have a Hive interface to Hadoop. Hive offers an interactive query language over Hadoop that is closely modelled on SQL. The only stumbling block remaining was porting my regular expression over to use Java syntax.

Here’s what I ended up with as a hive query:

select meta_artist.name, overallplayreach_artist.reach from meta_artist join overallplayreach_artist on meta_artist.id = overallplayreach_artist.id where meta_artist.name RLIKE '^(.+?\\b)\\s+\\b\\1$' and meta_artist.correctid IS NULL and overallplayreach_artist.reach > 50 order by overallplayreach_artist.reach desc ;

Joining against some “playreach” data to give a weighting according to rough popularity. My original SQL query took 17 minutes to run, on a fairly beefy database server. The hive query took less than 100 seconds to return, running across the entire Hadoop cluster. Awesome.

Without any further ado, here’s the top 10 results, roughly ordered by artist popularity.

Artists with repeating name patterns
Duran Duran
Frou Frou
Gus Gus
Talk Talk
Xiu Xiu
The The
Man Man
Cash Cash
Danger Danger
Gudda Gudda

I’ve created a tag artistartist, and tagged some of the entries already.

The full list is available here. There might well still be some rough data in there, I haven’t particularly sanity checked it by eye.

If you too would like the chance to play with Last.fm’s vast amounts of data and join our team, check out our job openings.

Last.fm Best of 2008

Wednesday, 3 December 2008
by Robin Lisle
filed under Announcements and Found On Last.fm
Comments: 36

While other annual retrospectives are based on editors’ picks or sales data, the Last.fm Best of 2008 list is based entirely on what the Last.fm community has been listening to this year and shows which artist, albums and tracks defined the musical landscape in 2008.

Last.fm Best of 2008

We compiled the list by looking at the data in a number of different ways to get a full picture of what you all listened to this year. First we looked at absolute numbers. It won’t surprise any followers of the Last.fm weekly charts to know that Coldplay, Radiohead and The Beatles topped the list. While Coldplay’s “Viva La Vida Or Death And All His Friends” certainly made an impact this year, many of the other artists had not released any new material, and we wanted to know what artists really made 2008 different. So, we decided to slice the data to show us which new artists really broke through this year. We chose to define “new” artists as artists who released their debut full-length album in 2008 in the UK, and we ranked them by total number of listeners. Check out who made the top ten here.

Next we looked at the top albums by scrobbles in 2008. When looking at all scrobbles in 2008 by album again we saw the weekly chart champions dominated the list. We then looked just at albums physically released in 2008 in the UK and ranked them by listeners, and came up with a list that shows what albums are this year’s classics. See if you can name all top ten and then score yourself here.

The top tracks of 2008 list (as you can probably guess by now) is made up of tracks released in 2008 and ranked by listeners. Who dominated the list: earnest rockers or that summer hit you couldn’t escape? Check it out here.

Finally, we put it all together in a radio for your listening enjoyment. To mix it up a bit and keep you guessing, we expanded the radio to include the top 30 artists, albums and tracks of 2008. If you’re feeling sleuthy, you can track down the source of the radio to see who didn’t quite make it to the top.

Enjoy!

Update: If you’re logged in on one of our international sites, please change your language to English to see http://www.last.fm/bestof/2008

Last.fm iPhone 2.0

Saturday, 27 September 2008
by toby
filed under Announcements and Found On Last.fm
Comments: 56

Back in July we launched Last.fm on the iPhone and iPod Touch. It was the end result of months of hard work and we were pretty happy with how it turned out. We received tons of positive feedback and although we weren’t able to launch in every country, we were able to provide an excellent streaming solution in more markets than any of the other iPhone players.

Fast forward 3 months… Apple released the iPhone 2.1 firmware which was unfortunately incompatible with the bleeding edge coding techniques cooked into our app. Fortunately, we have been feverishly working on the next generation app that also happens to be 2.1 firmware friendly. Team iPhone have once again outdone themselves to produce what quite frankly, is a work of art (check out the tagging interface if you doubt).

There’s been some awesomely high profile internet leakage of beta test footage, but below you can see the version that’s available right now from the iTunes App Store:


Here’s the feature breakdown:

  • VASTLY improved user interface all around (tap to zoom album art included)
  • Ability to tag songs
  • Personal tag radio
  • Calendar based events view
  • Common artists when viewing a user profile
  • Many other usability and back-end features

We’re working to release the app in as many countries as possible and this version is available now in the following: US, UK, Canada, Germany, Spain and France. We’re also working on some back-end changes that will make streaming more reliable on slower connections, so stay tuned.

This version is a great improvement from the first, but it is by no means the end of the line, so please send us feedback! We’re looking forward to making the app even better with your help.

Download it here.


Digg!

How Rainbows ruined the charts

Tuesday, 26 February 2008
by adrian
filed under Found On Last.fm and Lunch Table
Comments: 61

Since I was a teenager I have always loved music and at the same time have also had an affinity for numbers. Put the two together and what more could a young boy want? I’m talking about charts. I was addicted to them. Still am. I fervently refresh my last.fm profile page on Sunday nights and Monday mornings to see my personal weekly charts. In the past I used to listen to the South African charts live on the radio to see how my predictions for the movements of certain tracks had panned out. I used to buy British pop magazines to read the UK charts. I would stay up late on the weekends to watch US video charts. I got pen pals in Morocco to put the North African charts on postcards and send them to me. You get the picture.

Now most of these charts have something in common – they generally feature new music and there is a lot of change from week to week. A hot new tune could shake things up in the space of a few days. This is where the last.fm top tracks chart differs. Top tracks summarises what our users have listened to in the past week and while this often does include new music, if a whole bunch of people decided to go retro and relive the 80s by playing Public Enemy constantly, then Public Enemy would show up, even though they haven’t released anything (good) in years. Now, this has a certain charm to it and it can be interesting to see when an artist generates a lot of publicity (by dying for example) that they leap up the charts without there being any new music from them during that period. However it can also be really boring when the charts just stay the same for months on end.

Case in point. If you go back to Top Tracks for the week ending Sunday 14 October 2007 you will see the 10 songs on Radiohead’s “Rainbows” album (which was released that week) come out of nowhere, blasting Kanye West from number 1 and taking over the entire top 10. At the time I thought, wow, cool, this really is proof of the power of a new model of releasing music over the internet directly to your fans. It also shows that the whole album is popular, not just a few “singles” which would be released with a bunch of wack filler tracks around them. So far so good. Christmas came and went without anybody managing to get a word in on the top 10. After 18 or so weeks, the top 10 tracks were still all Rainbows. Yawn. I’m not a big Radiohead fan at the best of times, so this was really starting to get to me. Please, somebody, anybody, release something awesome and save the charts from Radiohead!

And then two weeks ago it happened, someone else managed to nudge their way not only into the top 10, but into the number one spot no less. It wasn’t a new song though, it was Amy Winehouse’s “Rehab” which saw a resurgence of popularity in the wake of her Grammy winnings. “Back to black” also made it in at number 9. Now, I’m not a big Amy fan either, but hey, at least here was something shaking things up a bit. Was this beginnng of the end for Rainbows in the Top 10? As much as a I would like to think so, last week saw them snatch number 1 back and drop Amy down to number 5. Ho hum.

Am I the only person who finds the Top Tracks chart boring? Surely not? Being a chart addict a few possible solutions come to mind – for example, adding more charts. Charts by tag could be nice, especially if more people were as anal as me when it comes to tagging music by genre. More detailed hype charts which would focus on new music? Charts which only cover music that was recently released? A worldwide Radiohead boycott? We are actually working on some of these at the moment (not the boycott!) and they will hopefully see the light of day in the coming months. If you’ve got ideas, we’d love to hear ‘em.

Big Up the Last.fm Massive

Thursday, 25 October 2007
by muz
filed under Found On Last.fm and Stuff Other People Made
Comments: 29

Shaggy is a well known, and dare I say it, respected musician. To date he has managed to amaze us and leave us awestricken with a string of bombastic musical numbers.

However just yesterday he managed to exceed himself and go that one step further that no artist has ever done before. He, the man, the myth, the mirth, has bigged up Last.fm. It is with great pleasure that I wish to share this momentous occasion with you, the users.

Behold, the video of amazingness.



Remember kids, you are tuned into Last.fm. Shaggy says so!

The Phenomenon of Rigid Song Structures in Pop

Friday, 5 October 2007
by martind
filed under Found On Last.fm and Stuff Other People Made
Comments: 28

The Last.fm Research group links to an interesting article on the Hometracked blog: All Linkin Park songs look the same

In the author’s words:

Each image below shows the audio level in (roughly) the first 90 seconds of a Linkin Park song. Note that I adjusted the tempo of a few tracks for better visual alignment.

Make sure to read the full article to see more pics and for the full explanation.

Do you disagree with the implications? Does this say anything about the state of Pop? What other patterns could one find in different forms of pop music? Discuss. (But pls stay civil :)

Oh and — has anyone done similar analyses for other artists as well? Let us know if you have something to show.

Update: now giving credit where credit is due… Thanks aradnuk for pointing out the error.

Edge Cases

Friday, 21 September 2007
by erikf
filed under Announcements and Found On Last.fm
Comments: 47

We’ve dumped millions of fingerprints into our new-and-improved sausage grinder over the past few days. We’re carefully sifting through the results, examining a lot of anomalies and edge cases. Here are some interesting ones:

But we’ve been doing more than just listening to music. In fact, we just released a new similar tracks feature on the site. Here are the similar tracks to Smog’s Our Anniversary, a recent favorite of mine.

Quick and to the Pointless

Thursday, 16 August 2007
by fiona
filed under About Us and Found On Last.fm
Comments: 15

So far, it seems, our blog has been dominated by announcements, technical tidbits and various other odds and ends. Seeing as Last.fm is actually meant to be about music we thought it was about time that we, your friendly neighbourhood Music Team, introduced ourselves. The rest of Last HQ may lead you to believe that we are somewhat of a side show to everything else that goes on here; but let’s face it, what would we be without the music?

An Introduction

Last.fm is and always has been dedicated to working closely with artists and labels, whether they are making music after school in a bedroom, releasing their first indie album, or are part of a major and selling millions of records a year. If you’re in a band, or run a label, you can join the Last.fm family by registering for a music account.

Our mission then is to make sure you can hear anything and everything you could ever want to on Last.fm. If you consider how many labels, how many artists, how many albums and how many songs have ever been created you may be close to achieving some idea of the mammoth size of this task.

This is us. On the roof.

Matt H, Jonas, Stefan B, Fiona, Helen

A day in any one of our lives might include keeping artists and labels happy (as well as meeting new ones), getting CDs encoded and online, managing promotional campaigns and making sure everything is running smoothly. There’s also research to be done, contacts to be made, phones to be answered, the Music Manager to babysit, a forum to tend, blog posts and newsletters to construct, developers to bribe and perhaps most vitally, tea to be drunk and biscuits to be eaten.

Bands in Bath Tubs

We also like to think that due to the time we spend browsing various artists pages that we spot some of the best oddities on Last.fm. For instance, the vast quantity of photos of bands-in-baths that we spotted earlier today; Liars, Menomena, CocoRosie, The Unicorns, Xiu Xiu and our very own Matt H’s Everyone to the Anderson. He can’t explain it, anyone else have any ideas?

Other recurring themes we’ve spotted include swimming pools (Reuben, Blink 182, Nirvana), the four-way split (Interpol, Fugazi, Grizzly Bear) and the ubiquitous ‘standing in front of a graffitied brick wall’ shot (Pretty much every band, ever). This does beg the question is there such a thing as an original band photo?

My winners are probably Animal Collective, whose highlights include a theme park log flume photo. The Shins as sleeping super heroes and Modest Mouse just seem to take it to the next level by turning themselves into trees, or giants, or a museum exhibition… in the desert.

The Last.fm ‘Stats’ Group and Mainstream-O-Meter

Thursday, 24 May 2007
by
filed under Found On Last.fm and Stuff Other People Made
Comments: 1

While reading the journal of user Hirenj_au earlier this year I found a reference to the then newly founded Last.fm Stats group, and was delighted by the idea.

The Stats group was founded by user C2600 in late December, but has already passed the 800 members mark, and member count is steadily growing. I’m not surprised—the group manifesto makes it clear that this this is one group to watch:

The main objective of this group is to collect all the interesting tools related to music stats that are scattered around last.fm, to share your stats with other people and discuss about music stats in general.

Fracking great idea if you ask me. I immediately joined (and saw that Mischa already was a member, and invited Erik who is always keen on stats…), and I’ve been watching their findings ever since.

They already have an impressive list of tools and visualisations, and over time we’ll present some of their (and our own) findings on this blog; today I’ll start with something simple.

Last.fm Mainstream-O-Meter

There already are a couple of approaches floating around the community to calculate your ‘mainstreamness’ manually. Here’s a well-designed web application by Luce. that does it for you: the Last.fm Mainstream-O-Meter. After Muz posted it in our internal IRC channel ages ago everybody went crazy for a while…

My score: 11.41% mainstream. So proud…

But of course you can always go lower. We already found out with the Chart Arcs experiment that Anil (aka joanofarctan) is a man of most obscure taste. I just found this comment from Luce. in the Mainstream-o-meter forum discussion:

@bubblesaurusrex—congratz! Until now there’s only one person who listens to music which is stranger than yours: joanofarctan