Skip to content

Analyzing Spotify music data using Visual Analytics for the course 2AMV10

Notifications You must be signed in to change notification settings

LeonVreling/2AMV10-Visual_Analytics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

2AMV10 Visual Analytics

Description of the project

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.

Working on the project

  1. Clone the repository to your local machine
  2. 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
  1. Install the necessary packages from the requirements document
pip install -r requirements.txt

Running the project

  1. Navigate into the Python virtual environment for the project
  2. Run the Flask server
python src\app.py
  1. In your browser of choice, navigate to the shown location that the app is running on (typically something like localhost:8050)

Generating your own data

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

About

Analyzing Spotify music data using Visual Analytics for the course 2AMV10

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages