Part 1/2: Strava killed my API, so Claude rebuilt my year-in-running film from a ZIP file
Strava shut the API door on me. One prompt later a year of runs was glowing on a dark map of Munich, and by lunchtime it was a vertical video on YouTube Shorts.
The problem: the door closed, the data stayed
Earlier this year I had already lost one project to this. In July my Strava dashboard had to move from the API to the bulk export, because Strava was shutting down API access. My second project, an animation that draws every run of a year as a glowing line on a map, had the same problem and sat there broken.
What I still owned was the export. Strava lets you download your whole account as a ZIP: one activities.csv and one GPX file per activity, some of them gzipped. That is a pile of files, not a product, but it contains every point I ever recorded.
The setup
The animation already existed as a small TypeScript web app in its own repository. I used Claude Code in that repo and, importantly, the Chrome MCP, so that Claude could open the page, play the animation and look at it. Nothing else: no new tools, no special skill. The export folder sat next to the code.
A note on the prompts below: the ones I wrote in German are translated, the English ones are as typed, and I shortened a few with [...]. Typos stay, because that is how I really write when I want things done.
The one prompt
This tool should be used to draw an animation of my strava runs within a certain area in 2025. Problem is, Strava killed the REST API for me. So I downloaded my activities as GPX. [...] 1) Rebuild this tool to work with this data 2) Test it in the browser 3) Test it with all data of 2025 4) Build in a new feature, such that runs do not wait until one is finished, but each run starts 2 sec after the one before 5) Check out the transparency overlay, it seemed there is a problem, that lines do not get "thicker" - less transparent after a while and all lines get moved on top of each other
This worked because of the numbered list. Items 2 and 3 turned „rebuild it“ into „rebuild it and prove it with a full year in a real browser“. Claude read the export, added a loader module, removed the login and the database from the old version, and played the whole of 2025 in Chrome.
Its report: 150 runs in 2025, 135 shown on the map, four without GPS, eleven starting outside the circle I had defined, 1,429.5 km drawn, more than 100 frames per second.
Why the lines never got brighter
Item 5 was a hunch of mine: on screen, a street I ran once looked almost the same as one I ran thirty times. Claude found the cause. Each line was drawn at an opacity of roughly 1 divided by the square root of the number of runs, about 0.09. With normal alpha blending, layers of that opacity quickly saturate, so thirty passes and a hundred passes look alike.
The fix was to draw all lines on one canvas with additive blending. Light adds up, so frequently run streets go from red to orange to yellow to white. My favourite park loop turns completely white, which is exactly what you want from a heat map of your own habits.
Right after that the tile provider started answering every map tile request with „API KEY REQUIRED“. Claude switched to a keyless dark grey tile source and put it into config.json. A different API this time, five minutes of damage.
Additive light, finally.
Phone first
The film is meant for a phone, so I wanted a hiking overlay too: an orange elevation profile at 80 percent opacity in the middle of the screen, with the red line running over it from left to right.
The playback time is still too long. 1) the runs need to spawn faster in between. 2) We thought of a nice feature, that whenever I went hiking, we show in the middle of the screen (this thing should be for mobile, an abstract version of the height profile layed on top with 80% opacity in orange and let the red line run from left to right over the height profile. Please debug the whole thing in mobile view. Can you build that, too?
Claude debugged in a phone-sized view and found three things: the date board was cut off (it showed „JAN 0“), the map was zoomed in too far, and late in the year the frame rate fell to between 10 and 35 frames per second. The reason was that every frame redrew all finished routes at three times pixel density. The fix was a separate canvas for finished routes that is only drawn once, and the frame rate went back to a steady 119 to 121. The first cut ended at 83 seconds with 21 hikes in it.
What went wrong
My first testing instruction was sloppy, and Claude resized my actual browser window. So I wrote this:
hey, for mobile test, please use the mobile view mode in chrome and do not resize my window. I need to work there
Claude then embedded the app as an iframe inside the tab where I had already switched on the phone view:
No.... I gave you an iPhone 16 view! do not double mess
A phone inside a phone. After that it loaded the app directly in the tab. The lesson: say how the agent should test, and say what it must not touch. An agent will happily resize the one window you are working in.
Other small stumbles: Chrome pauses animation frames in background tabs, so the animation looked stuck at December; a CSS division of a length by a length is not supported by most browsers and became a media query; and my start and end screens needed three rounds of „no, it is white and much bigger“ before they matched what I had in my head. Claude also noticed by itself that npm test ran only 35 of 109 tests because the file pattern still pointed at the old file extension.
Where did my 300 km go?
At the end screen I was sure I had run more than the counter said.
and the end frame is not centered :D still. I thought I did 1700 km in 2025 including hikes. what might we miss in data?
Claude answered with a reconciliation table:
| What is counted | Kilometres |
|---|
| Runs on the map (inside the circle, with GPS) | 1,429.5 |
| All runs | 1,561.0 |
| All runs plus hikes | 1,684.9 |
| Runs, hikes and walks | 1,697.7 |
My memory was right: 1,700 km was the sum with everything. The map counter was only right for what starts inside the circle. Not a bug, but a definition I had never written down. Ask your agent to reconcile numbers you remember. It costs one sentence and it taught me what my own filter did.
From a web page to a video
How do you get a web animation onto YouTube? Screen recording would have been lossy and jittery. Claude built a recorder command instead:
It drives the app with a frame-exact virtual clock and writes a 1080 by 1920 H.264 file, 90.6 seconds at 30 frames per second, 12.8 MB, in about two and a half minutes. Because the clock is virtual, a slow computer cannot drop frames.
Then I asked for the boring part:
nice one. now, is it maybe possible to clean up your code a bit? I mean, you basically wrapped everything into 4 pieces and a lot of ugly important css. Please clean up according to clean code standards. then push
Claude refactored into small classes, opened the pull request, took the Dependabot alerts from 17 to zero, added screenshots to the README and wrote a YouTube description. The Short went live at 13:35, a bit over four hours after the first prompt. The first merge attempt failed with „Base branch was modified“ although nothing had changed; the retry worked.
Find the code here: https://github.com/zappingseb/stravaanimation/blob/f6f2d064c11d0dbd3ffdf8e82afd65d136f08522
Takeaways
- When an API disappears, the export you already own is often enough. Describe the old tool, the new data source and a numbered test list in one prompt.
- Put „test it in the browser with the full year“ into the task. The bugs that mattered, the opacity and the frame rate, only showed up with real data on a real screen.
- Say how the agent should test and what it must leave alone.
- Ask it to reconcile numbers you remember. The answer is often a filter you forgot you had.
- Judging how the film feels in motion stayed with me. Claude said more than once that it could not watch the result as I would.
Part 2 is about turning this map into a two-minute film with a design canvas, transitions and sound.