Skip to content

my musical taste on Spotify with stats and machine learning

Notifications You must be signed in to change notification settings

nn1k1kvn/spotifav

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spotifav

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.

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. Comment out line 199 to draw a projection of a specific artist.
  6. 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 & 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

Cléa Vincent songs Eurythmics songs
PICTURE PICTURE

Outlier Detection

Contour plot of fitted one-class SVM
PICTURE

About

my musical taste on Spotify with stats and machine learning

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published