Skip to Content

Spotify Song Playlist Clustering

Get your playlist sorted at your convenience
July 31, 2025 by
Benedict Ouma

Spotify Song Clustering App 

Smart Music Grouping for Better Playlists:
Have you ever wondered how songs can be grouped by mood or energy instead of just genre? That’s what this project does. I built a music clustering app that groups Spotify songs based on their audio features - like tempo, danceability, energy, and more - to help people discover music that feels similar, even if it's from different artists or genres.

The app uses machine learning (K-Means and Hierarchical Clustering) to form smart clusters like “Chill Vibes,” “Workout Beats,” or “Soft & Emotional.” I also used PCA (a visualization technique) to help show how songs relate to each other in 2D space.

Why I built this:

To make music exploration easier and more meaningful, beyond genres. It helps platforms or music lovers auto-generate mood-based playlists or recommend similar tracks.

What the app does:
  • Lets you upload song data or use existing Spotify samples. 

  • Predicts the cluster a song belongs to based on its features.

  • Visualizes how songs are grouped.

  • Makes playlist creation smarter and more intuitive.

Built using: Python, Scikit-learn, Streamlit, PCA, and joblib for saving models.

Try the app here: Spotify Song Clustering App

Project Repository: Access My Github Repository Here