Background

Spotify

Spotify is my preferred way to listen to music. Their discovery and recommendation mechanisms are my favorite in the space.

Under the Spotify umbrella (I think?) is also an extensive genre-mapping project that can be seen at Every Noise At Once.

Not only are there derivative genres in there I have never heard of (and I suspect were perhaps invented at Spotify), but there is a distance mapping between every genre and its subgenres. Amazing. This page has been around for a while at this point but this is still so cool to me.

Spotify also exposes a generous API to developers that provides access to user listening preferences, as well as an endpoint to their recommendation engine which allows for a custom seed input and will return a list of recommended songs.

This is good for me!

Crowdpleasing

Something Iโ€™ve been curious about for a while is addressing the music interests of a group of listeners.

Given a group of 10 or more listeners, how could one create the most mutually enjoyed playlist? What methodology would yield the best results?

Which led me to these follow-ups:

  • Can you quantify eclecticism in music taste? How?
  • How do you reconcile longtime favorite music with recentlly enjoyed > music in a group context?
  • Dealing with outlier data, like artists that are low in popularity and may not have genre data mapped to them.
  • Distilling all of the above down into a quantifiable โ€˜group-ratingโ€™ > per for any song.

Use Cases?

Curiousity! Exploring, in the context of a group, how music tastes compare. Bars and clubs informing their music choice based on who walks through the door? A smart-jukebox?

The Plan

  1. Lure friends into data sharing and authorizing my Spotify App.
  2. Ingest results into a relational schema.
  3. Find some interesting methods for colliding the group data.
  4. Decide on some survey to get these friends to rate the results.

I got this project started a few years ago and iced it.

Whatโ€™s left of that is actually pretty functionalโ€ฆbut entirely in Node.js. Iโ€™m a little fussy about getting into the weeds with Node at the moment so I plan on port the whole thing to Python/SQLAlchemy.

Expected pain

  • Not a data scientist
  • Statistics do not come naturally to me, so Iโ€™ll probably have to break out a textbook.
  • Spotify user tokens need to be refreshed in perpetuity to avoid making the user re-authorize the app. Soโ€ฆcost of entry before I can even start working on this is deploying some tiny app to manage that every 6 hours.

Advantages

  • I like music
  • My friends will get a kick out of it
  • Fun problem space with a high ceiling for complexity if I want to dive in

Last Updated 10/14/2021