I’ve been a Spotify user for a long time, and like a lot of people I have Google Timeline enabled on my phone, quietly logging where I’ve been over the years. And at some point earlier this year I downloaded my Spotify listen data, and it occurred to me that Spotify plays + location information could be an interesting thing to look at… Do I listen to the same stuff at work as I do at home? What about when I’m in other countries? The hypothesis was that my listening habits might vary quite a bit by location, and I wanted a way to actually see that rather than just wonder about it.
So after some data squishing, location guessing, and UI magic, I now have a basic app that loads this data (browser only), allows you to draw some geofences around certain areas, and then look at your Spotify listening data based on that.

The core concept is pretty simple. Spotify lets you export your full streaming history, which is a JSON file full of play events with timestamps. Google Takeout gives you your location history, also a JSON file with timestamped location points. If you line those up by timestamp, you can figure out where you were when each song played.
Spotify gives you a bunch of files that include JSON lists, with objects that look something like this:
[
{
"ts": "2025-07-15T07:11:08Z",
"platform": "android",
"ms_played": 55229,
"conn_country": "GB",
"ip_addr": "x.x.x.x",
"master_metadata_track_name": "Superstition - Single Version",
"master_metadata_album_artist_name": "Stevie Wonder",
"master_metadata_album_album_name": "The Definitive Collection",
"spotify_track_uri": "spotify:track:1h2xVEoJORqrg71HocgqXd",
"reason_start": "appload",
"reason_end": "trackdone",
"shuffle": false,
"skipped": false,
"offline": false,
"offline_timestamp": 1752563389,
"incognito_mode": false
}
]Code language: JSON / JSON with Comments (json)
And the timeline data includes a bunch of “semanticSegments”, which have a bunch of different structures and data within, but ultimately you have a lot of coordinates, possibly with some other associated data:
{
"point": "40.6587021°, -8.7305152°",
"time": "2022-08-20T23:26:00.000+01:00"
},Code language: JavaScript (javascript)
You can read more about the format at https://locationhistoryformat.com/reference/semantic/, and specifically Activity Segments too.
So you can drag these files into the browser, and with just a little bit of connecting the dots, we have probably locations for song plays.

From there, if you draw a polygon on a map (“home”, “work”, “London”, whatever), you can filter all of your plays to just the ones that happened inside that polygon, and rank the songs by play count.

And then there are a series of different ways to view this data.
- Top songs: pick a zone from the dropdown and see a ranked bar chart of your most played tracks there. The usual suspects show up differently depending on the zone, which is satisfying to see.
- Overlap: a scatter plot showing which songs appear across the most zones. Songs that are genuinely everywhere in your life versus ones that are very location-specific.
- Compare zones: this one ended up being the most fun to look at. You pick two or more zones and get a slopegraph showing the top songs from each, with curves connecting the same song across zones so you can see where its rank goes up or down. Songs that only appear in one zone are faded out. You can add as many columns as you like, reorder them with arrow buttons, and dial in how many top songs to include.

This was developed with some agentic assisted development in VScode and GitHub Copilot. I guided Copilot through the goal, gave it some mock data, and referred it back to a recent other project of mine to align the stack, but also specifically noted I wanted to use Leaflet and D3. Getting the UI into a share that felt good took a bit of time, but it has a map focus, and gives me room to add some more views in the tabbed section at the bottom!
I’m trying out Cloudflare pages more and more, so this is once again a Cloudflare pages app, deployed easily from the CLI using wrangler, with a custom domain slapped on top, so it now lives at https://where-do-i-spotify.addshore.com/
If you have your Spotify data export and Google Timeline data sitting around, give it a go. if you don’t then go and download it (The Spotify one can take some time…)
The Spotify export can be requested from your account privacy settings, but your best to take a look at this article for the most recent “Can I download a copy of my personal data?” link.
The Android / Google data needs to be downloaded on your phone. The current path of getting there for me is:
- Settings
- Location
- Location services
- Timeline
- Export timeline data
The code is on GitHub at https://github.com/addshore/where-do-i-spotify
Enjoy!