A simple dashboard to observe the change in music taste. This project leverages the API provided by spotify.
I am not allowed to copy/distribute any data nor able to share my developer credentials.
Whoever whants to use or enhance this code can apply for credentials here: https://developer.spotify.com
Change credentials in the dataImport script to your own:
credentials = {"client_id": **?**,
"client_secret":**?*}
Change the username to the user of interest
username = **?**
Open the command window and change the directory to the location of the project. Use the following command to execute the dashboard:
bokeh serve spotify-taste-visualization
Navigate to the URL in your browser:
http://localhost:5006/spotify-taste-visualization
A new spotify login page will open and ask for your permission. Login and and allow your application the access to your data.
You will get redirected to a new URL. Copy and paste the url into your command window.
The application is now running. Refresh the local http://localhost:5006/spotify-taste-visualization
and start using the dashboard.
The dashboard visualizes the music library of the user. It consists of two main graphs. One is a scatter-plot of multiple song features with changing point sizes depending on a third feature. The second offers an aggregated overview of the new songs over time.
The user can decide between two data collection methods:
- All saved songs by a user
getData(credentials, username, saved = True)
(default) - All songs that are at least in one playlist
getData(credentials, username, saved = False)
Some potential selections are:
x/y:
- danceability
- loudness
- accusticness
- instrumentalness
- energy
size:
- None
- loudness
- duration in ms
Both graphs are connected to the same data. Therefore, selection datapoints in one graph highlights and selects the connected datapoints in the other graph. This allowes for a more specific inspection, depending on the periode of interest.
Additionally, certain patterns might be confusing or some features are not intuitive. Therefore, this dashboard allowes to hover over a specific data-point to optain additional information to what song this point corresponds.
Potential future enhancements:
- Adding filter possibilities
- Adding new aggregation selection methods
- Adding aggregated selection summary
- Adding data table of selection
- Adding differing aggregation time frames