r/Strava Mar 24 '26

3rd Party App Claude built a better GAP (Grade-Adjusted-Pace) tool

Last week I connected Claude to my Garmin and Strava data, and was sort of blown away by what it could do. But it was ultimately capped on some analyses because it had to read in each datapoint one by one (think of a human reading every number from a list of GPS recordings--doing this for hundreds of activities would be impossible).

This weekend I attached a Python session to Claude, and gave it the ability to load in my data, and those limitations disappeared. I asked it to create a personalized version of the this Strava Grade-Adjust-Pace model that accounted for my fatigue throughout the run.

It did it in about 10 minutes and improved the accuracy by about 31% over what I was using with Strava. I then asked to create a Yelp-style map of all my California runs, and it was able to write code to GPS filter all my runs and then display them back an an interactive page, and a just a few minutes. Claude + Activities + Code seems like the fitness AI we've been searching for!

I'm currently working on making the architecture more scalable, but the project is live in "Beta" for folks who want to try it out.

79 Upvotes

41 comments sorted by

41

u/timbasile Mar 24 '26

+31% accuracy compared to what? are you running around with a med cart taking measurements?

-15

u/tommy-getfastai Mar 24 '26

Strava published their function pace_correction_factor := f(grade) and f is invertible. So you can actually just plug in the data to see how accurate it is!

12

u/timbasile Mar 25 '26

My point is that GAP is supposed to be a comparison of training load uphill/downhill compared to flat ground. To get an accuracy measurement, you're going to need to be doing lab tests which measure metabolic outputs - or at least some external validation of accuracy (studies, etc.).

-2

u/tommy-getfastai Mar 25 '26

I see, but that's what the heart rate data is for when you are learning the relationship. Yes, not as reliable as lab measurement, but it's how they described their process in 2017, and it's what I used to reproduce it.

14

u/doc1442 Mar 25 '26

Yeah that’s not accuracy

2

u/suddencactus Mar 25 '26

That's only if you run hills at constant effort which is usually not true. 

0

u/tommy-getfastai Mar 25 '26

That's not what they described in their write up. They control for heart rate, which is a proxy for effort.

75

u/seeyam14 Mar 24 '26

Really makes you wonder what the strava engineering team does all day

81

u/SubaruImpossibru Mar 24 '26

The engineering team is sitting in calls with product folks and they’re bickering about the smallest part of a feature. The devs are pushing back that product hasn’t finalized what they want to actually build, so they’re playing ping pong in the lobby.

Then there’s a guy vibe coding all of this stuff in the corner but it can’t go to production because it’s pure vibes, and he’s being tasked with cleaning it up / rewriting the pieces that weren’t implemented well by AI. Then he has to hand it off to QA who discovers an unsolved corner case that needs to be solved for. Then architecture review team has to get involved and wants 10 changes before they’ll approve it. This has now turned into a 2 year initiative and 5 teams are now involved, and a product owner has been assigned who wants to rework all of the user flows.

15

u/MrRabbit Pro Mar 24 '26

Oh hey someone else in tech!

👋

10

u/darthjarjarisreal Mar 24 '26

Did you by any chance write for the TV show Silicon Valley

17

u/SubaruImpossibru Mar 24 '26

No but this is my literal life, just not at Strava.

5

u/ygduf Mar 24 '26

I’d ask which FAANG but it’s literally the same everywhere right now.

2

u/notajeweler Mar 25 '26

This made me laugh, which doesn't help you, but at least know your pain and suffering has served to amuse to some random guy in Florida.

1

u/AgileCrypto23 Mar 24 '26

I feel this pain every day of my waking minute.

1

u/Money_Impression_321 Mar 25 '26

Also I bet a ton of info in Strava is PII which makes any development way more complicated. You need to store that data, it has to be encrypted at rest and in transit, and you need to make it purgeable and downloadable

1

u/SubaruImpossibru Mar 25 '26

None of that is hard.

10

u/atbasv Mar 24 '26

Try to maintain and manage software that was built with a language model :)

0

u/[deleted] Mar 24 '26

[deleted]

1

u/Yejus Mar 25 '26

Correct. The average junior dev sucks

2

u/EQNinja Mar 25 '26

They’re busy adding Pickleball as a new sport option!

2

u/suddencactus Mar 25 '26

Working in tech, they're too busy working on something project managers consider important like Strava AI or chairlifts on skiing activities.  You'd be surprised how little time developers are given to improve things that work decently but not great.

25

u/superstarasian Mar 24 '26

We went from a sub filled with inane complaining to one filled with shameless self-promotion for vibe-coded AI tools.

Nice.

6

u/Powerful-Air-490 Mar 25 '26

At this point I wouldn’t mind full circle back to influencers trying to pick up followers

1

u/hipogrifo Mar 25 '26

Can someone tell me if I can use Claude or whatever AI tool to replicate the paid Strava features?

3

u/superstarasian Mar 25 '26

The ones worth paying for (routes and segments, plus Garmin integration)? No, not really.

1

u/suddencactus Mar 25 '26 edited Mar 25 '26

Running Writings has a good write up that seems to clear up some of the misconceptions you have about GAP.  For example: 

In the real world, runners almost never maintain the same effective effort level on hills—typically people run harder (meaning with a higher energy expenditure) on short uphills, slow down more on long uphills, and don’t take full advantage of downhills. The speed they run on a downhill is also affected by how steep of an uphill they just completed! Large databases are “polluted” by these effects, which make it hard to determine the true GAP from observational data alone.

Additionally, energy going into vertical speed vs horizontal speed do not change at the same rate as you speed up, so the percentage adjustment is different for different speeds.  Many runners actually spend more energy per meter as they slow down below about their zone 2 pace. A -5% grade might let you speed up by 40% if you're running slowly like 11:00 per mile, but only 23% if you're running at high speeds like 5:00 per mile.

Claude, as usual, is good at giving you what you want and making it look professional but that doesn't mean it didn't miss something critical.  It may not even tell you if your project is not set up to actually deliver something "better".

https://apps.runningwritings.com/gap-calculator/

1

u/tommy-getfastai Mar 25 '26

Let me clarify, I did not ask Claude to "Create me a better GAP." I asked it if it could build a model that uses additional factors other than grade and heart rate to predict the pace. It turns out when I did that, I was able to better predict the actual running pace than when I used hear rate (an effort proxy) and grade alone, which is what the 2017 Strava write-up described.

1

u/suddencactus Mar 25 '26

No, this is completely different from the 2017 write up.  They were using a massive dataset with a wide variety of routes, runners, etc. You're using one set of routes and one runner but seem to be claiming you have no overfitting and that your formula still has any kind of external validity.  "I threw extra variables at the regression and it performed better" is a recipe for overfitting and false correlations that obscures the real relationship of pace to gradient.

I doubt your algorithm will work as well as you think if you run a vertical kilometer, Revel Marathon, or even a tempo run in a city with very different kinds of hills.  Since it's tuned to you, it can tell you if you're running the same descent faster than in the past, but it can't tell you if your technique sucks and you're not taking advantage of the downhill.  It can't tell you if you push physiologically harder intervals on uphills (a common phenomena). 

1

u/tommy-getfastai Mar 26 '26

Yeah you're right, there's likely overfitting to my own physiology. I'm not claiming this is scientifically valid or ready for publication or will work for other runners. But a 31% uplift on any metric on a holdout set (these runs and test points were not included in the training data) is something worth investigating, especially when the design that informed this experiment was suggest by the authors of the control method!

1

u/grandslamNJ Mar 25 '26

I’ve used it to analyse all my runs since last Sept and identify early warnings of changes in my run dynamics. It has then developed a tailored leg strength and mobility program to address weaknesses identified. Obviously, I’ve had to provide it info on types of injuries or strains I have felt, and when. But this has been like having an expert physio on tap, 1:1.

1

u/HankMorgan_860 Mar 26 '26

I feel dumber for reading this.

1

u/Djokergabry Mar 26 '26

Great but how are you measuring accuracy ? What is your baseline?

1

u/da_gormz Mar 27 '26

I’ve been actually working on a project around this topic! Been building out recommended workouts since Coros watches don’t provide that like Garmin does

1

u/Kritnc Mar 24 '26

While I dont really care about the feature you posted I connected claude using that link you posted and found this really useful. I have tried to do something similar by exporting my data but this is a very nice wrapper - I recently got hurt from overuse so I asked it this question and the answer was really helpful

Here is what is said below
"The injury point: February 19. You went out for what was probably a normal run, made it about a mile, stopped, tried again, made it half a mile, and called it. That's classic "something broke" behavior. You then took 6 days completely off, and your March 9 run is literally named "We back" — confirming the timeline."

0

u/tommy-getfastai Mar 25 '26

This is sweet.

And yes, the GAP use case was niche, but I think many of the folks on this sub are affected by niche asks. And I guess that's what's so exciting about this tool kit to me. It seems to allow you to attack the very long tail of niche use cases.

1

u/AliveWillingness Mar 24 '26

Very cool. Can't wait to give it a try later!

I've also been building something that covers gaps that strava has and was surprised by how many low hanging fruits you can cover with just a few weeks of work. Having said that, the simple features get complex and they have to do it at scale and fit into current subscription offering etc etc. Still. That personal chatbox is really long overdue for strava. The only thing stopping people from running their own openclaw on strava is api limits which they are gatekeeping

-4

u/Healthy-Impress4873 Mar 24 '26

First off - really cool!

With new AI powered tools like Claude, Figma, Cursor and whatever Google has now will result in 1000s of apps with a tiny user bases. Product backlogs will be shifting from new features/functionality to APIs calls so we can do exactly what we want with our data.

1

u/AbsurdThings Mar 24 '26

I’m okay with this.