What’s the TTKP?
Posted by Paul in data, fun, Music, web services on November 9, 2010
Whenever Jennie and I are in the car together, we will listen to the local Top-40 radio station (KISS 108). One top-40 artist that i can recognize reliably is Katy Perry. It seems like we can’t drive very far before we are listening to Teenage Dreams, Firework or California Gurls. That got me wondering what the average Time To Katy Perry (TTKP) was on the station and how it compared to other radio stations. So I fired up my Python interpreter, wrote some code to pull the data from the fabulous YES api and answer this very important question. With the YES API I can get the timestamped song plays for a station for the last 7 days. I gathered this data from WXKS (Kiss 108), did some calculations to come up with this data:
- Total songs played per week: 1,336
- Total unique songs: 184
- Total unique artists: 107
- Average songs per hour: 7
- Number of Katy Perry plays: 76
- Median Time between Katy Perry songs: 1hour 18 minutes
That means the average Time to Katy Perry is about 39 minutes.
Katy Perry is only the fourth most played artist on KISS 108. Here are the stats for the top 10:
| Artist | Plays | Median time between plays |
Average time to next play |
|---|---|---|---|
| Taio Cruz | 84 | 1:07 | 0:34 |
| Rihanna | 80 | 1:27 | 0:44 |
| Usher | 79 | 1:20 | 0:40 |
| Katy Perry | 76 | 1:18 | 0:39 |
| Bruno Mars | 73 | 1:30 | 0:45 |
| Nelly | 56 | 1:44 | 0:52 |
| Mike Posner | 56 | 1:57 | 0:59 |
| Pink | 47 | 2:20 | 1:10 |
| Lady Gaga | 47 | 1:59 | 1:00 |
| Taylor Swift | 41 | 2:17 | 1:09 |
I took a look at some of the other top-40 stations around the country to see which has the lowest TTKP:
| Station | Songs Per Hour | TTKP |
|---|---|---|
| KIIS – LA’s #1 hit music station | 8 | 39 mins |
| WHTZ- New York’s #1 hit music station | 9 | 48 mins |
| WXKS- Boston’s #1 hit music station | 7 | 39 mins |
| WSTR- Atlanta – Always #1 for Today’s Hit Music | 8 | 38 mins |
| KAMP- 97.1 Amp Radio – Los Angeles | 11 | 38 mins |
| KCHZ- 95.7 – The Beat of Kansas City | 11 | 32 mins |
| WFLZ- 93.3 – Tampa Bay’s Hit Music channe | 9 | 39 mins |
| KREV- 92.7 – The Revolution – San Francisco | 11 | 36 mins |
So, no matter where you are, if you have a radio, you can tune into the local top-40 radio station, and you’ll need to wait, on average, only about 40 minutes until a Katy Perry song comes on. Good to know.
NH#1 Mines Follies
10 years ago I read this post in slashdot about a new activity called geocaching – it seemed simple enough: take some item and hide it somewhere in the world, record the latitude and longitude using your GPS receiver, post the location to the Web so that others can find your stash. I had a GPS so I figured I’d give it a try. Unfortunately, there were not any geocaches nearby, so one saturday afternoon I took the GPS, and the 4 kids, went to the local park and hid a cache. What I didn’t realize at the time was that I was placing the first Geocache in New Hampshire (and only the 158th placed in the world). 10 years later there are 1.2 million geocaches scattered around the world, and Geocaching is now a thriving activity enjoyed by thousands of people worldwide. I maintained the cache for a few years, but drifted away from geocaching – but the cache lived on, being maintained by many good samaritan geocachers over the years.
A few weeks ago, I received an email from Michael Noetzel, a local Geocacher who’s taken over maintenance of the cache, inviting me to the 10th anniversary of the cache. I showed up late Friday afternoon expecting to see a half-dozen hardcore geocachers – I was quite surprised to see over 50 people, young and old, had come to celebrate the 10th anniversary of the cache. Here are a couple of pics from the event:
It was a real fun event – everyone made me feel very special – giving me a plaque, a special rose compass coin and a tee-shirt. Thanks to Nashuan and Bright Shining Stars for making this all happen.
Jennie’s ultimate road trip
Posted by Paul in code, fun, Music, The Echo Nest on October 20, 2010
Last weekend at Music Hack Day Boston, I teamed up with Jennie, my 15-year-old daughter, to build her idea for a music hack which we’ve called Jennie’s Ultimate Road Trip. The hack helps you plan a road trip so that you’ll maximize the number of great concerts you can attend along the way. You give the app your starting and ending city, your starting and ending dates, and the names of some of your favorite artists and Jennie’s Ultimate Road Trip will search through the many events to find the ones that fit your route schedule that you’d like to see and gives you an itinerary and map.
We used the wonderful SongKick API to grab events for all the nearby cities. I was quite surprised at the how many events SongKick would find. For just a single week, in the geographic area between Boston and New York City, SongKick found 1,161 events with 2,168 different artists. More events and more artists makes it easier to find a route that will give a satisfying set of concerts – but it can also make finding a route a bit more computationally challenging too (more on that later). Once we had the set of possible artists that we could visit, we needed to narrow down the list of artists to the ones would be of most interest to the user. To do this we used the new Personal Catalogs feature of the Echo Nest API. We created a personal catalog containing all of the potential artists (so for our trip to NYC from Boston, we’d create a catalog of 2,168 artists). We then used the Echo Nest artist similarity APIs to get recommendations for artists within this catalog. This yielded us a set of 200 artists that best match the user’s taste that would be playing in the area.
The next bit was the tricky bit – first, we subsetted the events to just include events for the recommended set of artists. Then we had to build the optimal route through the events, considering the date and time of the event, the preference the user has for the artist, whether or not we’ve already been to an event for this artist on the trip, how far out of our way the venue is from our ultimate destination and how far the event is from our previous destination. For anyone who saw me looking grouchy on Sunday morning during the hack day it was because it was hard trying to figure out a good cost function that would weigh all of these factors: artist preference, travel time and distance between shows, event history. The computer science folks who read this blog will recognize that this route finding is similar to the ‘travelling salesman problem‘ – but with a twist, instead of finding a route between cities, which don’t tend to move around too much, we have to find a path through a set of artist concerts where every night, the artists are in different places. I call this the ‘travelling rock star’ problem. Ultimately I was pretty happy with how the routing algorithm, it can find a decent route through a thousand events in less than 30 seconds.
Jennie joined me for a few hours at the Music Hack Day – she coded up the HTML for the webform and made the top banner – (it was pretty weird to look over on her computer and see her typing in raw HTML tags with attached CSS attributes – kids these days). We got the demo done in time – and with the power of caching it will generate routes and plot them on a map using the Google API. Unfortunately, if your route doesn’t happen to be in the cache, it can take quite a bit of time to get a route out of the app – gathering events from SongKick, getting the recommendations from the Echo Nest, and finding the optimal route all add up to an app that can take 5 minutes before you get your answer. When I get a bit of time, I’ll take another pass to speed things up. When it is fast enough, I’ll put it online.
It was a fun demo to write. I especially enjoyed working on it with my daughter. And we won the SongKick prize, which was pretty fantastic.
Great Caesars’ Ghost!
Posted by Paul in Music, The Echo Nest on October 18, 2010
The Echo Nest now has an official Editor in Chief. Eliot Van Buskirk has joined the Echo Nest staff. He’s writing about music apps at Evolver.fm. He already has a whole bunch of great writeups about Music Hack Day Boston and all of the projects that have come out of it. Check it out: evolver.fm
The Echo Nest gets Personal
Posted by Paul in code, Music, playlist, recommendation, remix, The Echo Nest, web services on October 15, 2010
Here at the Echo Nest just added a new feature to our APIs called Personal Catalogs. This feature lets you make all of the Echo Nest features work in your own world of music. With Personal Catalogs (PCs) you can define application or user specific catalogs (in terms of artists or songs) and then use these catalogs to drive the behavior of other Echo Nest APIs. PCs open the door to all sorts of custom apps built on the Echo Nest platform. Here are some examples:
Create better genius-style playlists – With PCs I can create a catalog that contains all of the songs in my iTunes collection. I can then use this catalog with the Echo Nest Playlist API to generate interesting playlists based upon my own personal collection. I can create a playlist of my favorite, most danceable songs for a party, or I can create a playlist of slow, low energy, jazz songs for late night reading music.
Create hyper-targeted recommendations – With PCs I can make a catalog of artists and then use the artist/similar APIs to generate recommendations within this catalog. For instance, I could create an artist catalog of all the bands that are playing this weekend in Boston and then create Music Hack Day recommender that tells each visitor to Boston what bands they should see in Boston based upon their musical tastes.
Get info on lots of stuff – people often ask questions about their whole music collection. Like, ‘what are all the songs that I have that are at 113 BPM?‘, or ‘what are the softest songs?’ Previously, to answer these sorts of questions, you’d have to query our APIs one song at a time – a rather tedious and potentially lengthy operation (if you had, say, 10K tracks). With PCs, you can make a single catalog for all of your tracks and then make bulk queries against this catalog. Once you’ve created the catalog, it is very quick to read back all the tempos in your collection.
Represent your music taste – since a Personal Catalog can contain info such as playcounts, skips, and ratings for all of the artists and songs in your collection, it can serve as an excellent proxy to your music taste. Current and soon to be released APIs will use personal catalogs as a representation of your taste to give you personalized results. Playlisting, artist similarity, music recommendations all personalized based on you listening history.
These examples just scratch the surface. We hope to see lots of novel applications of Personal Catalogs. Check out the APIs, and start writing some code.
The Music Hack Day Boston t-shirt
The design by Jocelyn Petko, modeled by Ben Lacker.
The most popular music tech attire …
Naturally, if you are reading this you’ll want one of your own. But there’s only one way to get one.










