1 of 13

Spotted!

The algorithm that will judge your music tastes

2 of 13

Ever wondered how the spotify algorithm works?

Thought process

3 of 13

The Spotify web API has tons of info

Spotipy (python library)

Thought process

4 of 13

By going through the API, we found we could extract data about each song of a playlist

Thought process

Interesting features to compare:

  • Danceability
  • Energy
  • Key
  • Loudness
  • Mode
  • Speechiness
  • Acousticness
  • Instrumentalness
  • Liveness
  • Valence
  • Tempo
  • Popularity rating

Release date

Popularity

Mood

Danceability

5 of 13

Valence

Feature example

A measure from 0.0 to 1.0 describing the musical positiveness conveyed by a track. Tracks with high valence sound more positive (e.g. happy, cheerful, euphoric), while tracks with low valence sound more negative (e.g. sad, depressed, angry).”

> What is valence?

6 of 13

Valence

  • Sad songs 2022 - crying (...) https://open.spotify.com/playlist/3c0Nv5CY6TIaRszlTZbUFk
  • Sad songs for sad nights https://open.spotify.com/playlist/4yXfnhz0BReoVfwwYRtPBm

0,28

0,30

0,47

0,51

  • Happy Hits https://open.spotify.com/playlist/37i9dQZF1DXdPec7aLTmlC
  • Happy songs everyone knows https://open.spotify.com/playlist/0RH319xCjeU8VyTSqCF6M4

0,56

0,63

feature example

7 of 13

Provide fun feedback based on the user’s playlist

Our project

8 of 13

Create a website that will judge the user’s music taste

Our project

How it works:

  1. The user pastes the URL to their playlist

  • They press the button to generate their feedback:

  • 4 graphs comparing their music tastes to “the Norm”, depending on track

Release date

Popularity

Mood

Danceability

  • A sentence summarising the takeaways for all the features

  • Whatever the playlist contains, the feedback will be insulting (see this as a satire of the importance we give to screen feedback)

9 of 13

How we implemented it

Our project

  1. We coded the project on Python, as its Spotipy library allowed us to directly access the Spotify web API

  • To access song analysis data, we had to create a “Spotify for developers” account and project

  • We used Wix to create a funny simple user interface, however we didn’t have time to figure out how to run the Python code from it…

  • Unfortunately, the code can only be run from the Python terminal and display Matplotlib graphs right now.

10 of 13

Playlists to try

  • “Best songs ever imo” -kbattah

https://open.spotify.com/playlist/5PM1wJCvvX7u66w0GBFEIh?si=6b35877fa2e947e9

  • “Classical reading” - Spotify

https://open.spotify.com/playlist/37i9dQZF1DWYkztttC1w38

  • “Top Songs - Global” - Spotify

https://open.spotify.com/playlist/37i9dQZEVXbNG2KDcFcKOF

  • “Sad songs for sad nights” - aligatie

https://open.spotify.com/playlist/4yXfnhz0BReoVfwwYRtPBm

  • “Happy songs everyone knows” - skye

https://open.spotify.com/playlist/0RH319xCjeU8VyTSqCF6M4

11 of 13

Problems we encountered

  1. WIX WEBSITE and how to run our program on there
    1. WIX does not allow for JS and CSS imports so my references to the spotipy functionalities and thus my program could not run
    2. Tried to get familiarized with Brython/Trinket but ran out of time!
  2. DATA size and analysis limitations
    • Finding sample playlist that are representative of people’s diverse tastes
    • Ran numerous trials to analyze the average value of each feature in order to make our ‘judgements’

12 of 13

How will we improve our project?

More

  1. Find a way to run our code on the website!!
  2. Implement Machine Learning to refine what we consider ‘norm’ for each feature, thus delivering more high quality ‘insults’
  3. Make the graphs more esthetic to be appealing for social media sharing

13 of 13

Sources