This is the Data Science portion for an Application that uses Machine Learning to build a Song Recommender based on a audio track analysis.
๐ Go to the app Spotifier
- For the Data Science portion of this application, we used this Kaggle Spotify Audio Features Dataset. Dataset has a number of tracks and for every track an artist. You will also find Spotify's Track Id, along with a number of numeric audio features such as acousticness, danceability, tempo, speechiness and several more. We took this information and utilized a KDTree from Scikit Learn in order to model our Song Recommender. This method finds the songs nearest to each other in terms of the numerical audio features previously mentioned. From there we have a list of songs, and along with each song is a number of recommended songs(in the example we use 15). We then push it to AWS RDS PostgreSQL database.
Endpoints that do not say โNo Auth Requiredโ or Log In/Register/Log Out will all require authentication
Register
POST - https://spotify-song-suggester.herokuapp.com/createnewuser
--- parameters ---
- username
- password
Log In
GET - https://spotify-song-suggester.herokuapp.com/login
--- takes in ---
- username
- password
Log Out
GET - https://spotify-song-suggester.herokuapp.com/oauth/revoke-token
Get All Tracks (for testing) - No Auth Required
GET - https://spotify-song-suggester.herokuapp.com/tracks/tracks
- Limit 10 per page
Get Track By Name (trackid) - No Auth Required
GET - https://spotify-song-suggester.herokuapp.com/tracks/track/{name}
Save/Favorite Track by Name (trackid)
POST - https://spotify-song-suggester.herokuapp.com/tracks/save/{trackid}
Get Userโs Saved/Favorited Tracks
GET - https://spotify-song-suggester.herokuapp.com/tracks/savedtracks
Get Suggested/Recommended Tracks by Name (trackid) - No Auth Required
GET - https://spotify-song-suggester.herokuapp.com/tracks/recs/{trackid}
- returns 10 similar songs with song details
Remove Song From Saved/Favorited
DELETE - https://spotify-song-suggester.herokuapp.com/tracks/remove/{trackid}
Notice how they generally follow the same trajectory along the path across the features, naturally with a few outliers
This is helping to Visually convey how Songs are recommended based on songs nearest to it in terms of quantifable Audio Features such as accoustiness, danceability, energy etc.
- 2019-09-21 - Started explanatory notebooks
- 2019-09-23 - Re-structured and organized folders, and files
Pull requests are welcome. However for major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.