This project provides a basic Spotify recommendation system. It leverages the Spotify APIs to gather data, process it using sentiment analysis and feature engineering, and finally applies machine learning techniques to recommend tracks based on user preferences.
- Data Transformation: Utilizes the
spotipylibrary to interface with the Spotify API. - Sentiment Analysis: Analyzes track names for subjectivity and polarity using the
TextBloblibrary. - Feature Engineering: One-Hot Encoding, TF-IDF Vectorization, and Min-Max Scaling are used to process the song corpus.
- Recommendation System: Generates track recommendations using cosine similarity.
- Python 3.x
- Libraries:
spotipy,pandas,sklearn,TextBlob
- Clone the repository:
git clone [repository-link]. - Install required Python packages:
pip install -r requirements.txt.
To use this recommendation system:
- Provide your Spotify API credentials in the script via a .env file.
- Run
python fileGeneration.pyto scrape song data from some of the top playlist producers on Spotify. - Run
python dataTransform.py artistnameto and pass in an artist to draw song recommendations from. Recommendations.csvis generated with 40 sorted recommendations
- This code is inspired by a series on Medium.com
- Noah Mitchem - Code implementation
