Using the Spotify API & PULP to create a 90 minute noughties playlist. PULP is agreat python library for linear programming. Linear programming is an incredibly powerful tool for optimising business problems.
- Start by cloning the repository:
git https://github.com/ChristopherBacon/Linear-Programming.git
-
Create a
python 3.7.3environment. -
Install dependencies
pip install requirements.txt
- Get your Spotify API credentials:
https://developer.spotify.com/documentation/general/guides/authorization-guide/
- Linear Programming Playlist Notebook Notebook contains code to accesss the Spotify API, source playlist data and apply PULP optimisation to find best 00's playlist.
This was a fun project, the first time that I had accessed Spotify data through the API using the Spoitpy library. Was really good to apply optimization techniques that I had learnt as part of my degree using the python optimization library PULP. However, I might try another project using Sci-Kit optimization module as this takes a lower level approach in that the user defines their matrices before setting up the problem. This is akin to the methods used throughout my OU degree. A future project in the making perhaps or an extension to this one.
