Spotify playlists

Spotify playlists

Tags
Projects
Python
R
Optimization
Published
Author

Goals

The main goals of this project was to build an application to generate spotify playlists according to some criteria. Another "technical" objective was to test the R/Python interconnectivity, and thus to build an application using both.

Quick description of the application:

The application may take a few seconds to load completely (at most one minute), here is the unloaded application:
notion image
And here is the loaded application:
notion image
You can select the desired features of the playlist and the application will update the list. You can then listen to the music directly from the application (a 30 seconds extract if you are not connected, all the music otherwise) and select your new favorite playlist!

Description of the application (data recovery, processing)

We retrieve data directly from the Spotify API using a Python script, which will extract all available playlists. For each playlist, we then need to extract the list of each song and the list of features of each song. Once these data are retrieved, we perform a constrained optimization with the inputs specified by the user as a constraint. The final list of selected playlists is then sent back to the front end managed by Shiny.
In order to keep the data up to date, we have also developed a system that uses the GitHub API as a database. Thus, the python script is stored on Heroku and automatically triggered once a day to retrieve the data. Then, thanks to the GitHub API, the previous data is transferred to an "Archive" folder to keep track of it, then the new data is transferred to the "data" folder.