Data mining Strava

I realize Strava now connects to Claude AI for pro users but I wanted to export all of my Strava activity and classify each ride and year so I could either analyze by hand or upload into an AI. Historically I’ve been very poor at record keeping.

I wrote some Python code to do this here which I’m posting as it may be of interest to others.

The script outputs a yearly summary and does a detailed analysis for each training session. It can automatically identify interval sessions and give a description of each training. It can also attempt to identify HRmax, LT2 and LT1 and track performance but this obviously depends on the data. To identify LT1 you’ll need to have done a hard 4 hr plus session. I’ve only looked at HR not power as I don’t have much power data myself but the analysis should be similar.

For example I uploaded the current year into ChatGPT and asked for suggestions of what training I should do for the next 4 weeks:

I would keep one long ride every 1–2 weeks, because it is clearly part of what has worked this year, but I wouldn’t keep trying to extend the duration further just for the sake of it. You’ve already demonstrated that you can handle 4–6+ hour riding and 130 km days.

The missing stimulus is now pretty obvious: structured high aerobic/threshold work.

So for the next month I’d probably make the week:

  • one 4×8 min session;

  • one sustained 30–60 min climb/tempo effort;

  • one long aerobic ride, perhaps 3–4 h, rather than repeatedly doing 6h+;

  • optional easy riding around that.

That gives you a much better balance between the endurance base you’ve deliberately built and the intensity you haven’t trained since 2022.

Doesn’t intervals.icu already do this? (other than the AI generated training suggestions)

My aim was to efficiently and locally bulk summarize training session data into a structure that a LLM can easily ingest to enable longitudinal analysis on that data. I’d heard about people dumping 2000 gpx files into claude ai but that seems both inefficient and expensive.

What are you getting out of this that something like wko5 is not able to do?

Are you more or less likely to follow the plan set out by the bot than the TR bot than the human you pay for a training plan?

Oh please!, WKO5 has to be the worst piece of software ever created. Slow, dumb syntax, bad graphics. Using LLM’s to replace WKO5 is the best use case right now.

Wko is extremely flexible and doesn’t interpret your training to fluff you up. It’s a disappointing that TrainingPeaks has let it go by the wayside with shitty progressive web apps that spend half a lifetime redrawing. Since we’re on TrainerRoads forums, please fix the 15-30 second draw on ai ftp prediction and cache it when it’s done.

“Oh please!”?

At least respond to my question in a reasonable way, or go off about wko5 I guess.

So much for trying to have a conversation.

At least wko5 doesn’t try to gaslight the user like LLMs do.

All you are using the LLM for is to write the code for the wiring and the dashboards. It’s deterministic. It’s awesome. If you own your data and are looking to generate queries, this is the way to go 100%.

That’s not what happened.

At this point your just trolling.

What do u mean? How so?

wko5, golden cheetah etc, there are lots of dashboards to help analyze data.

I was really just looking to go through my existing data and see what insights, if any, I could extract by analyzing trends and see how I could integrate with a LLM to give more than cookie cutter advice.

I’m interested in this from a perspective of getting data out that is not tied to any particular platform or software. In years to come Strava, Wk0x, TrainingPeaks, whatever might be historic relics and it might be useful to have the data in one big text file (or whatever format) that can be analysed by the latest training software.

Also, I might have missed it, or it might be easier than the advanced bespoke analytics people might want to do, but I’d like to build something that is a simple traffic light system of types of sessions. On the basis you try to repeat similar sessions (or progressively overload the type of session) every few days, I think it would be useful to see when was the last time I did a long ride/a sweet spot/a VO2/whatever. And also, when was the last time I did a strength session or went running. Green would be 2-3 days apart, amber might be 4-7 days and red would be over a week. And then irrespective of data analysis and whichever AI saying what an amazing athlete you are, you can track simple compliance of your consistency in doing different session types.

Not intending to derail the discussion but I think the OP’s original intent is solid, aside from debate on preferences on which AI and which analytical software.

You own a hard drive, put the files on it.