Type in the name of your starting and ending points, and the application will create a playlist of music by artists that from the area you are traveling through. Drive through Boston you might hear Aerosmith or Donna Summer. Drive through New Orleans and you might hear Lil Wayne or Dr. John.
- Submitted by: Paul Lamere
- Tools used: Spotify Web API
- Source code repository: https://github.com/plamere/roadtrip-mixtape
- Source code license: http://opensource.org/licenses/MIT
The app uses the nifty Google Maps API to calculate and display your route. The route is then broken down into 15 minute legs. For each leg, we find the nearest five unplayed artists and use them to generate a 15 minute playlist. If there are more than five nearby artists, we chose the most popular five.
To build the app I used the new artist location data from The Echo Nest. This feature, allows you to retrieve the location of any artist.
For this app, I collected the locations for the top 100,000 or so most popular artists in the Spotify catalog. These artists were from about 15,000 different cities. I used geopy along with the Yahoo Placefinder geocoder to find the latitude and longitude for each of these cities. For the mapping and route finding, I used version 3.9 of the Google maps API. For 30 second music clips and album art I used the Spotify Web API. With the tight integration between the Echo Nest and Spotify it was easy to go from a geolocated Echo Nest artist to a list of Spotify track IDs for songs by that artist.