Training guidance tools using the API

There is no single watch doing this. You need an app like Kubios, HRV4Training, iThlete, Oura-ring…
Those are the apps that will give you decent morning HRV values. The Garmin “stress” indicator for example is completely useless for this.

1 Like

I have this, but am definitely not religious in using it every morning…

This is what I have in my Excel for mac.


The updated Excel file for linking a manual download is ready.
Download the file, and let me know of any problems. This will also work on a Windows-based computer, it you wish to use the manual download of CSV files.

Try use the latest file I shared a few minutes ago.
It’s also setup to get the data from your downloads folder.

1 Like

It may be a us formula… the week and year counting is not the same for the first and last week of the year

The formula uses isoweeknum, which is the first Thursday of the year. I was meant to provide a fix for that, and forgot about it.

I forgot about the Kg/Pounds conversion, but did have a look at it.

The dropdown list shows “Kilograms (Kg)”, but the formula shows “Kilograms” only.
If you add " (Kg)" it will be correct; note there is a space between Kilograms and (Kg).

Before:

After:

There is a hidden tab (called lookup), that does a lookup on the data from Activities and Wellness, to then summarise the weekly Load, Fitness, Fatigue, Ramp Rate and Hours, effective every Monday. The date might show 2022-52 but it is “taken care of” in the lookup tab.

1 Like

Do I understand correctly that only Power Query is supported on Mac? If yes, I’m outta luck 'cause I have v16.16 and v16.57 or later is needed.

Importing a text file just throws the data into new columns and nothing else populates.

I installed the trial version of Excel 365 and now have Get Data (Power Query). However, no option window opens when clicking Data Source Settings.

Trying the Google Sheets version… Is there a ReadMe for that version? I can’t figure out how to make it work either.

Thanks for your work guys looks great.
I’m usually on a Mac so had held off until something like the sheet @Gerald produced a couple of weeks ago arrived.
I already have a simple shell script that pulls activities via API calls for me and my “coached” athletes (the family) and then opens an Excel file that pulls in the data.

So making this work for activities was a simple matter of editing the Data Source, all done and working. :slight_smile:
I hoped wellness and getting HRV graph would be as easy. API call was straightforward, file downloads, looks OK, but returns an Expression.Error on Run_eftp whenever I try to refresh, has anyone else seen this, or have any suggestions?

image

Easiest workaround is to add a fake FTP to your settings for running in intervals.
This has been corrected in the latest Win version.Don´t know if it is in latest Mac Version from @Gerald .

A shortcut is to enter the run eFTP in the following two places:

  1. Settings (set FTP under run settings)
  2. Activities (set eFTP for Run)


I haven’t updated it since version 1.0
I’ll try spend some time updating it based on the the latest changes required on the windows version.

Open the Power Query Editor advanced editor and copy paste the highlighted section from the latest Win version.
Don’t change the source setting and you should be good.

1 Like

Thanks @MedTechCD and @Gerald, I have an FTP set (for run and bike) and eFTP (at least relatively recently), I’ve tried adding in the eFTP as suggested, and only getting wellness data from last year or so (where the data is “good”) and ran in to same problem.

In the end I skipped the import and did an old school copy and paste from csv open as separate Excel sheet, and found that there’s an extra column in mine. Unfortunately with many columns in the middle blank I don’t know where the misalignment has occurred yet (somewhere between sleep quality and Vo2max is all I can tell so far), but can see a whole pile of things working nicely so many thanks guys!

1 Like

I am getting an error too from the Wellness tab. As the MacOS version is a manual download and not API linked, it shouldn’t give errors like on the Windows version.

I’ll take a look later today, or over the weekend.

Depends on how you get the manual download in the sheet.
If you use the Get Data from File (csv, txt) as the source, everything else can be re-used. The functionality to adapt to regional settings will remain intact.
If you copy/paste, that’s another story…
Are you downloading the Wellness and Activity csv from the intervals website or are you using a curl command to get them?
If downloaded from the website, a whole lot off columns need to be checked for existence because that download contains only what you configure as visible. Best thing to do in that case, is remove all entities from the Query command that are not in your download, like’ {“kcalConsumed”, type number}’ for example. Fastest is using the Advanced editor and when done, save the query as you will use it.

I use curl “curl -u API_KEY:AKeyWasHere https://intervals.icu/api/v1/athlete/iXXXX/wellness.csv > stu_wellness.csv”

When that failed to refresh as a data source I eventually thought to copy and paste into Excel (from csv opened in Excel), and that’s how I noticed the column mismatch reported with the curl and Excel data refresh way.

To try to work out which column I input some wellness data today that’s not normally present, to try to narrow down which field was extra/missing somewhere, and the results (below) were more confusing.
I input motivation, and blood pressure data, those three are 1 column to the left of where they “should” be, but by Vo2max everything is 2 field to the left.

injury motivation spO2 systolic diastolic bloodGlucose lactate hydration hydrationVolume bodyFat abdomen comments Vo2max ctl atl rampRate
3 132 82 42.580322 36.908264
42.88345 37.96913
45 43.916737 43.799862

So I’ve resorted to field by field comparison in csv vs Excel and can see there is a mismatch, as far as I’ve noticed a few are in different places and menstrualPhasePredicted is the only extra:
CSV via CURL
date weight restingHR hrv hrvSDNN readiness menstrualPhase menstrualPhasePredicted kcalConsumed sleepSecs sleepScore sleepQuality avgSleepingHR soreness fatigue stress mood motivation spO2 systolic diastolic hydration hydrationVolume bloodGlucose lactate bodyFat abdomen comments injury baevskySI vo2max ctl atl rampRate ctlLoad atlLoad Ride_eftp Run_eftp
vs Excel
date weight restingHR hrv hrvSDNN readiness baevskySI menstrualPhase kcalConsumed sleepSecs sleepScore sleepQuality avgSleepingHR soreness fatigue stress mood injury motivation spO2 systolic diastolic bloodGlucose lactate hydration hydrationVolume bodyFat abdomen comments Vo2max ctl atl rampRate ctlLoad atlLoad Ride_eftp Run_eftp Column1

Does anyone have any thoughts on how to match up (have already considered importing raw CSV to a sheet, and pulling data from there into “Wellness” tab to allow for column swaps, or some *nix string hackery to rip and push the right number of fields to make it work), but would be curious to see what others are experiencing before I do something non transferable and maybe pointless).

Update:
I’ve found a way to make it work (at least on macOS and presumably *nix) stopping the extra, command line is now:
curl -u API_KEY:AKeyWasHere https://intervals.icu/api/v1/athlete/iXXXX/wellness.csv > stu_wellness.tmp
cut -d , -f 1-7,9-99 stu_wellness.tmp > stu_wellness.csv

Found a separate issue where the decimal in the Run_eftp is missed by something, so 330.99518 becomes 33099518 and 331.3265 becomes 3313265, which makes the slightly higher value and order of magnitude smaller (due to less decimal places), but I don’t have any ideas about fixing that one…

1 Like