Skip to content

In this project, I harnessed the Spotify API to gather rich song features, which I meticulously analyzed and leveraged to craft a content-based recommendation website. The user-friendly interface, powered by Streamlit

License

Notifications You must be signed in to change notification settings

meysamraz/spotify-song-recommendation-app-end-to-end-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spotify Recommendation System App End To End Project

In this project, using the data I collected from Spotify (audio streaming and media services provider), I tried to make a recommendation system that based on audio feature, song genre, artist, etc., the song we choose gives us Suggest songs

This project is a part of my portfolio, showcasing my skills. The main code isn't public, but I'm open to collaboration! Interested? Email me at mr.raz2002@gmail.com

Watch Demo here :

https://meysamraz-song-recommendation-spotify-project.streamlit.app/

Watch Demo here heroku version :

update : heroku may shutdown free hosting. If this link didnt work use link above

https://spotify-song-recommendation.herokuapp.com/

alt Text

Project Overview :

1 - Setup Spotify Api

  • Open spotify developers go to dashboard - create app and get your client id and secret id

2 - Collecting Data

  • Collect songs between 2017 and 2022 (1000 per year)

    • id : song id
    • song name : name of the songs
    • artist name : name of artist who sing the song
    • artist genres : genres that artist sings
    • album genres : genres of songs album
    • release_date : release date of song
    • song link : link of song on spotify
    • image : cover image of song
    • song duration : song duration
    • song popularity : song popularity on spotify
  • Collect songs that i liked

  • Collect audio features of collected songs

    • Danceability: Danceability describes how suitable a track is for dancing based on a combination of musical elements including tempo, rhythm stability, beat strength, and overall regularity. A value of 0.0 is least danceable and 1.0 is most danceable.
    • Acousticness: A measure from 0.0 to 1.0 of whether the track is acoustic.
    • Energy: Energy is a measure from 0.0 to 1.0 and represents a perceptual measure of intensity and activity. Typically, energetic tracks feel fast, loud, and noisy.
    • Instrumentalness: Predicts whether a track contains no vocals. The closer the instrumentalness value is to 1.0, the greater likelihood the track contains no vocal content.
    • Liveness: Detects the presence of an audience in the recording. Higher liveness values represent an increased probability that the track was performed live.
    • Loudness: The overall loudness of a track in decibels (dB). Loudness values are averaged across the entire track. Values typical range between -60 and 0 db.
    • Speechiness: Speechiness detects the presence of spoken words in a track. The more exclusively speech-like the recording (e.g. talk show, audio book, poetry), the closer to 1.0 the attribute value.
    • Tempo: The overall estimated tempo of a track in beats per minute (BPM). In musical terminology, tempo is the speed or pace of a given piece and derives directly from the average beat duration.
    • Valence: 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).
  • Collect audio features of liked songs

  • Merge songs and their audio features

  • Save data into a csv file

3 - Understand the data

  • Shape of the data

  • Check column dtypes

  • Check is there any null values

  • Check the correlation

4 - Cleaning the data

  • Drop "album genres" column

  • Convert artist genres to str

5 - Analyzing Data

  • Number of songs per year

  • Songs duration distribution and (min,avg,max)

  • Song popularity distribution and (min,avg,mode,max)

  • Artist genres wordcolud

  • Analyzing audio features

6 - Apply Dmensionality Reduction

  • Split audio features from data

  • Standard Scaling Audio Features

  • Apply PCA

  • Put PCA Output Into a Dataframe

  • Visualize reduced dimension Data

7 - Apply Clustering

  • Select the right value of k for clustring

  • Fit reduced dimension data into Kmeans

  • Visualize clusterd data (kemans output)

8 - Create Recommendation System

To build the recommendation system, I used audio features, songs, song genres, singers, etc. The more data the features are closer to the songs in question, the more data will be displayed.

9 - User Interface

To create my user interface, I used streamlit framework, a powerful framework that allows me to create the desired user interface completely using Python.

Deploy on server

I used Heroku a cloud platform as a service which provide a free hosting to deploy my app on it. it's and amzaing platform gave me so much flexbilte to deploy your apps

Libraries and FrameWorks used in the project

About

In this project, I harnessed the Spotify API to gather rich song features, which I meticulously analyzed and leveraged to craft a content-based recommendation website. The user-friendly interface, powered by Streamlit

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published