Skip to content

Instantly share code, notes, and snippets.

View stedmanhalliday's full-sized avatar

Stedman Halliday stedmanhalliday

View GitHub Profile
@stedmanhalliday
stedmanhalliday / spotifyArtistStats.js
Last active February 12, 2025 15:24
Display Spotify streaming stats for your favorite artist (hours, days, and unique songs listened with a list of top tracks). Place this file in the same directory as `Spotify Account Data` after downloading and unzipping your annual Spotify data. Customize the constants up top then run with Node.js.
const ARTIST = "Yung Skrrt"; // substitute any artist (ensure exact match)
const TOP_TRACKS = 10; // number of top trackx to display
// time conversion constants
const MS_IN_HR = 3600000;
const HRS_IN_DAY = 24;
// GOTTA HIT THE STORAGE SPOT, GET UP IN THE STASH!
// retreive and consolidate streaming data
const streams0 = require("./Spotify Account Data/StreamingHistory_music_0.json");