Inspiration

We've all struggled with finding new music to listen to.

What it does

Ever wanted to experiment with a new genre of music but didn't know where to start? Or maybe expand your tastes in a genre you already like? Statify aims to simplify this process by analyzing top songs in a specific genre and generating a Spotify playlist in that genre based off your music interests. All the user needs to do is: visit Statify.com, login to their Spotify account, and select a music genre they are interested in exploring. Statify then analyzes the user's top 100 most played tracks and compares them with that genre's top 1000 songs on Spotify. Statify then creates a playlist for the user based on which songs of that genre fit the user's tastes the most, using a K-Nearest Neighbors Regression machine learning model. Comparison attributes of songs include:

  1. acousticness
  2. danceability
  3. energy
  4. instrumentalness
  5. liveness
  6. loudness
  7. speechiness
  8. valence

The user's top 100 most played tracks were used as a training/test set for the machine learning model. The machine learning model is trained to predict the ordinal ranking of the songs (using the ranking of the user's top 100 most played songs as a basis).

How we built it

  • Front end: Uses react
  • Middleware: Flask calls the back-end script and handles the Spotify API calls
  • Backend: Python script that uses scikit-learn library, running a KNeighborsRegressor machine learning model

Challenges we ran into

  • Getting the Spotify OAuth running properly
  • Creating a sizable test dataset for machine learning (Spotify API only allows access to a user's top 100 tracks)
  • Being limited to the amount of song information we could query for each call (general limit of 50 per call)

Accomplishments that we're proud of

  • Creating a relatively successful machine learning model given the small size of the test dataset
  • Deploying a nice looking front-end with a Spotify playlist widget

What we learned

  • Before designing a machine learning model, we should consider the size of our dataset and if we can do anything to make our dataset better

What's next for Statify

  • Expand to include more genres
  • Allow the user to select a ranked playlist to base music predictions off of
  • Allow user to set playlist length
  • Allow for combinations of genres
Share this project:

Updates