The goal of this project is to analyze (personal) Spotify music data using various Visual Analytics techniques, for the course 2AMV10 at the Eindhoven University of Technology.
- Clone the repository to your local machine
- Navigate to the main folder of the repository and start a new Python virtual environment. Make sure that you are using Python version 3.10 when creating the environment.
python -m venv venv
venv\Scripts\activate.bat
- Install the necessary packages from the requirements document
pip install -r requirements.txt
- Navigate into the Python virtual environment for the project
- Run the Flask server
python src\app.py
- In your browser of choice, navigate to the shown location that the app is running on (typically something like localhost:8050)
In order to visualise your own data on the dashboard, you first need to request it via the Spotify website. Make sure to choose the option for "Extended streaming history". Note that this can take up to 30 days.
Once you have data you want to visualise, create a new folder named data
. This folder will contain one file with all the features from all the songs, data_features.csv
, and a folder per user you have the data from in the format data_NAME
. Within these folders, you can place all the endsong_X.json
files generated by Spotify. By running json_to_ordered_csv.py
, these json files are combined into one csv file with the same name as the folder they are placed in. This file is detected automatically and can then be accessed from the application.
This should result in the final file structure of the project:
├── src
│ ├── assets
│ │ └── favicon.ico
│ ├── app.py
│ └── json_to_ordered_csv.py
├── data
│ ├── data_XXX
│ │ ├── data_XXX.csv
│ │ ├── endsong_0.json
│ │ ├── endsong_1.json
│ └── data_features.csv
├── requirements.txt
└── .gitignore