Predictify
Overview
A Data analysis tool to scrape your Spotify History usage and let a ML-Model predict your next songs
Authentication API
Official Documentation Authorization Code Flow
Usable possible APIs
Recently Played Tracks: /me/player/recently-played Official Spotify Documentation
Get Track: /tracks/{id} Official Spotify Documentation
Get Track's Audio Features (Deprecated): /audio-features/{id} Official Spotify Documentation
Get Track's Audio Analysis (Deprecated): /audio-analysis/{id} Official Spotify Documentation
Get Artist: /artists/{id} Official Spotify Documentation
Docker usage
cd inside the projects directory:
cd predictify
To run predictify inside a container, first make sure to build the image:
make dockerfile
Create a seperate data directory (e.g. docker-data):
mkdir data-docker
Note
To detatch the container to run it in the background add the
--detachdirectly after theruncommand. Then run the following docker command, to run the container in the foreground:
docker run \
--name predictify \
--network=host \
--volume $(pwd)/data-docker:/app/predictify/data \
--volume $(pwd)/config:/app/predictify/config \
predictify:unstable
GDPR Data
If you have gdpr data, create a folder: data/gdpr_data and add all .json files containing your play history into it. In order to extract it, run the script: python3 src/runtime.py --export