Skip to content

Request your streaming history over the past year from Spotify and then use this app to analyze the JSON file and reveal information about your listening behavior

Notifications You must be signed in to change notification settings

alexander-mc/Spotify_Stats

Repository files navigation

Spotify Stats

Why wait until the end of the year to view your music history on Spotify? Request your streaming history over the past year from your Spotify account and then use Spotify Stats to analyze the JSON file. This app will create a report on your listening behavior and allow you to store the information so that you can review it later.

Links

  • Spotify Stats - Play with the app! Note that this app works best on Chrome. Also, because this app is deployed on Heroku, it may take a minute to load. If it takes longer than this, you may need to refresh your browser.
  • Demo - Watch a demo of the app.

Preview

Welcome Screen Sign Up Screen Create Report Screen Upload File Screen Report - Songs Screen Report - Artists Screen Report - Albums Screen Report - Genres Screen

Usage

  1. Request your streaming history data. First, log in to your Spotify account. Next, click on the 'Privacy settings' link on the left sidebar.

Spotify Settings Screen

Scroll down to the bottom of the page, click on the 'Request' button to request your data, and go to your email to confirm the request.

Spotify Request Data Screen

Wait a couple days for an email from Spotify with a link to download your files. You will then have 14 days to download the file.

Note: Spotify mentions that it could take up to 30 days to process your request, however I have typically received my data 2-3 business days after submitting my request (and I've requested data quite a bit).

  1. Upload the streaming history JSON file. Once you've downloaded your data from Spotify, look for the file with 'StreamingHistory' in the title.

Spotify Data File Screen

Log in to Spotify Stats, click 'Add Report', and upload this file.

  1. Create the report! In the app, click on 'Create Report', then minimize the screen and grab a cup of coffee. The program could take some time to run through all the data, so be patient -- it will be worth the wait! It took a little less than an hour for the program to process my file, which was about 50k lines of code (this came out to ~8k songs, or ~320 hours of music).

Configuration

  1. Register a Spotify application and obtain a client ID and client secret. Follow this guide from Spotify for information on how to do this: https://developer.spotify.com/documentation/general/guides/app-settings.

  2. Create a file titled '.env' in the program's root directory with the following (replace the 'X's with information from the previous step):

export CLIENT_ID=XXXXXXXXXXXXXXXXXXXXXXX
export CLIENT_SECRET=XXXXXXXXXXXXXXXXXXX
  1. Run 'bundle install' to install the necessary Ruby gems and you're good to go!

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/alexander-mc/spotify-stats. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

About

Request your streaming history over the past year from Spotify and then use this app to analyze the JSON file and reveal information about your listening behavior

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published