Spotifav Save

🤘 Map out your musical taste on Spotify with machine learning

Project README

spotifav

Accompanying blog post: medium.com/p/fe50c94b8af3

After I found out that I have access to some interesting features (danceability, loudness etc) on my Spotify playlists, I decided to crunch some numbers in order to discover patterns on my favorite songs. For reality check, I compared my songs with the Today's Top Hits playlist, leading to some fun observations. You can get the aforementioned features for your playlists by this clever Echonest app.

This repository contains the necessary code, data, and Jupyter Notebooks to estimate histograms, correlation heatmaps, dimensionality reduction and visualization with t-SNE and outlier detection with One-Class SVM visualized in contour plots.

To run you should set up the usual sci-Python gang: Matplotlib, Numpy, Pandas, Seaborn and Sklearn.

Steps

  1. Log in to Echonest app and choose your playlist.
  2. Copy the table to a spreadsheet.
  3. Save it as csv.
  4. Run spotify_favorites.py to find correlations and estimate t-SNE and SVM
  5. Run today_top_hits.py to compare step's 4. data with today top hits.

To replicate the artist-level projections as seen in my essay, please comment out line 196.

As an alternative to the Echonest app, you can query your playlists directly through the Spotify API, getting access to even more features. Let me know how it went!

Histograms & Correlations

Histograms of my playlist's features Compared to the most popular Spotify playlist
PICTURE PICTURE
PICTURE PICTURE
PICTURE PICTURE
PICTURE PICTURE

t-SNE Dimensionality Reduction

Arcade Fire songs Belle & Sebastian songs
PICTURE PICTURE

Outlier Detection

Contour plot of fitted one-class SVM
PICTURE
Open Source Agenda is not affiliated with "Spotifav" Project. README Source: sdimi/spotifav
Stars
56
Open Issues
0
Last Commit
3 years ago
Repository

Open Source Agenda Badge

Open Source Agenda Rating