A simple app used to show the Emotional flow of albums and playlists Based off of an Idea by RCharlie https://www.rcharlie.com/post/fitter-happier/
Will connect to Spotify and use Plotly in order to create and build charts Can be used to graph and analyze albums, songs and (eventually) playlists for their emotional highs and lows for proper playlist development. will eventually allow creation of playlists via Spotify's User API
Haven't figured out how to chart the data yet for super long playlists but that's a problem for later
Eventually it may do sentiment analysis using Lyric data but that's far off in the future
to install all dependencies run the following command install Python 3.10.4, VSCode and the python extension for VSCode for easy debug.
***Warning! (If you want to use WSL / linux It'll take like an hour but I'd be glad to give you some links on how to do and configure it to work with VPNs)***
pip install pip-system-certs spotipy flask plotly lyricsgenius
optionally you can use pandas dataframes really easily with plotly. Try with all thy might
as well make sure the following command is run in all terminals
set CURL_CA_BUNDLE="" python
you'll need to make a Spotify Developer Account and generate an application in order to run Chartify.
After doing so, fill out the chartify.env.sample file and rename it to the proper chartify.env or you could set them your environment variables in your bash profile but that'd be overkill. Right?
to run the app, it's as simple as setting environment variables like those in chartify.env and then calling
flask run
or better yet you can run it via containers
docker build -t <somerepo>/chartify:tag .
docker run --name ChartifyAPI --env-file <./path_to_chartify.env> -d -p <available port>:5000 <somerepo>/chartify:tag
Then there's a shell script! simply call
chmod +x ./build_and_run.sh
./build_and_run.sh <preferred_name_of_tag_or_leave_blank_for_latest>
It will perform the build, kill and remove the running container (if used before) and then run your new build!
and then to test one of the charting methods simply enter the following in your browser
http://localhost:5000/analysis/playlist/43M6s8VIc1duJg6MXDyXUV
So go ahead
Happy Hunting!