Determined to go to more concerts this year, I wanted a better way to explore local shows. I listen to the majority of my music on Spotify, so I decided to make playlists for each of my favorite venues featuring artists from their upcoming concerts.
Each playlists is updated once a week on Monday. The order is determined by concert date. Once an artist has performed, they're removed from the playlist. I cycle through the top tracks, which means playlists will repeat every few months.
You can find a list of all venues, and add your own, at https://upcoming.fm.
Before writing any code, I manually created a single playlist for the Bill Graham Civic Auditorium. While not much work, I knew this approach wouldn't scale beyond a few venues. Satisfied with the results, I looked into what APIs were available to automate playlist creation.
It turns out Spotify has a fantastic API for search and playlist management. One quick sign up later, I had a developer account and a set of credentials. I've been writing the majority of my side projects in Go recently, so I used the excellent zmb3/spotify package. It didn't take long before I could search for artists by name and create a playlist with a popular song from each artist.
However, Spotify does not have an API for upcoming concerts at venues. For that, I needed Songkick. They have an API, but sign-up is not self-serve. I applied for a developer account and had my key within in a few days. Using the Upcoming events endpoint, I was able to get the names of all upcoming headliners for a given venue. I then plugged that list into my code above and had an automated solution. Spotify.
I wasn't happy with the Go clients for the Songkick API, so I wrote one myself. It's deliberately incomplete, as I only needed to access one endpoint.
I deployed to code to Heroku and have the script run once a week.