Relevant blog post: Dimitris Spathis
The idea is simple. 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 some patterns of 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.
- Log in to Echonest app and choose your playlist.
- Copy the table to a spreadsheet.
- Save it as csv.
- Run
spotify_favorites.py
to find correlations and estimate t-SNE and SVM - Comment out line 199 to draw a projection of a specific artist.
- Run
today_top_hits.py
to compare step's 4. data with today top hits.
As an alternative, you can query your playlists through the Spotify API, getting access to even more features.
Histograms of my playlist's features | Compared to the most popular Spotify playlist |
---|---|
Cléa Vincent songs | Eurythmics songs |
---|---|
Contour plot of fitted one-class SVM |
---|