https://github.com/wrongbyte/spotify-graph
:sparkles: Creating scatterplots with Spotify songs
https://github.com/wrongbyte/spotify-graph
matplotlib python seaborn spotify-api
Last synced: 9 months ago
JSON representation
:sparkles: Creating scatterplots with Spotify songs
- Host: GitHub
- URL: https://github.com/wrongbyte/spotify-graph
- Owner: wrongbyte
- Created: 2021-08-30T23:50:53.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-06-24T00:40:31.000Z (over 3 years ago)
- Last Synced: 2025-03-19T21:36:36.389Z (9 months ago)
- Topics: matplotlib, python, seaborn, spotify-api
- Language: Python
- Homepage:
- Size: 46.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Create a graph with audio features from your playlist's tracks using matplotlib and seaborn

***
This is a simple test script with which you can generate a graph of two song features (of your choice) from your playlist's tracks.
As it is a test for using Spotify's API features, you will need to have a **client ID** and set up a few things, described here: https://developer.spotify.com/documentation/general/guides/app-settings/
***
## Local set up
### - Set the IDs
In `secrets.py`, set `client_id` and `client_secret` to the values you see in your **Spotify dashboard** (https://developer.spotify.com/dashboard/applications).
Set up the `redirect_uri` to that you have chosen for your application as well.
### - Get the URI of the playlist you want to use
**Using the Spotify Desktop**: go to the playlist you want to use and, in _share options_, choose "copy Spotify URI". This is the `playlist_id` you will use in `secrets.py`.
***
## Running the script
**1. Install all dependencies from `requirements.txt`**
**2. Run `generateURL.py` to generate the URL**
When you go the URL generated, you will see a page to authorize the app's access to your data. Allow it and you will be redirected to the page you have chosen for your `redirect_uri`.
**Pay attention
to the URL you see in your browser**, that will be something like this: `?code=`. Copy the key you see after "code". **You
will use it to run the script.**
**3. Set `user_code` on `secrets.py` to the code you copied on step 2.**
**4. Run `generateGraph.py` and see your results!**
***
Observations:
- The graph generated does not show info about **all** songs yet ~~(I have to work on it)~~