Pretty sure Spotify's Discover Weekly works specifically because of the constraint they set up for themselves. It's updated once a week, and there is a finite number of songs in the list. With other services, people turn on the "recommended" station and expect an infinite stream of music that they will like.

Mapping all the songs we listened to on a road trip!

Last weekend Amber, Anima and I drove from San Diego to Palm Springs to YxYY. We were streaming music from Spotify on the whole drive, and Spotify was scrobbling to my Last.fm account. Of course I was also tracking my location like I always do. Then it dawned on me that I could put together a map showing all the songs we listened to and where we were for each! Below is the result!

You can click on any of the pins to see the song that was playing at that point, and can even launch Spotify to play them!

Code

First I downloaded my listening from Last.fm from the time period of the drive. Since each entry in the history includes a timestamp, I then query the Geoloqi API for my location at that time. I do this for each song, building up a GeoJSON object with all the needed info like song name, album cover image, etc.

After I generated the large GeoJSON file of all the songs, it was simple to put that onto the map using the Esri-Leaflet library. Leaflet can easily take a GeoJSON object and throw it onto the map with very little code. Most of the code was for formatting the HTML popup when you click one of the pins.

I then needed to retrieve the full history showing the exact path we drove. One call to the Geoloqi API gave me all the data in the time range, and I just had to re-format it as a GeoJSON LineString object.