Training guidance tools using the API

Hi, great work, interesting
I have tried according to instructions but it only downloads activity data (I have HR, RHR ad Rmssd from OURA linked to intervals.icu, shown correctly on the web)
Why could that be? I put API_KEY on both fields (activity and wellness) in excel sheet as indicated
EDIT : solved, I had an error message saying run eFTP was missing, I put that in (I mainly do cycling) and now wellness works too

sigh… (My) excel mac doesn’t support this… I don’t get the “Get Data”
web says supposedly only avaialble on Excel Mac Beta

1 Like

Did you add separate links for activities.csv and wellness.csv?

1 Like

I’ll work on an alternative file and test on Mac, then let you know once done.

3 Likes

Thx, I don´t own any Apple device. Can´t test or diagnose.

2 Likes

Updated

1 Like

Feedback: it looks like the weekno formula is not 100% correct. For my first activities in 2022, it results in “2022-52” as weekno.

Good catch. Should be 2021-52.
@Gerald inserted the week-nr for the ATP. He will have a look.

Please can you click on the cell where this occurs, and send a screenshot of the page.
I don’t have 2022-52 in my original ATP spreadsheet, so it could be wrong in the file where we’ve merged all tabs together.

I am using ISOWEEKNUM in the formula.
WeekNum uses the week containing January 1 as the first week of the year. The result from this function can range from 1 to 54. ISOWeekNum uses the week containing the first Thursday of the year as the first week of the year. This follows the ISO 8601 date and time standard definition for week numbering.29 Jun 2022

[

WeekNum and ISOWeekNum functions in Power Apps

](WeekNum and ISOWeekNum functions in Power Apps - Power Platform | Microsoft Learn

I have two activities at the end of 2021 that show 2022-52.

I also noticed a problem on the weight conversion in the Sweat Loss calculator

1 Like

I’ll spend some time on the problems today.

1 Like

This is amazing. What is the reason something like Google sheets wouldn’t work? Is it the API integration?

Everything can work in Google sheets, except for the chart on the iThlete tab. I can share what I have currently, but I stopped when struggling with the chart; it’s not as easy as Excel (for me).

2 Likes

Happy to take a look to see if I can help. Drop me a message (if possible here) and let’s see if we can get it working. I think cloud based software is more accessible and common these days so it’d be good to see if we could get it working!

2 Likes

I’ll share the Google Sheets link with you later today.

3 Likes

Sweet. Share me any information alongside it and I’ll see what I can do to help get it working.

It would be perfect if you can make it work in Google sheets. I’ve made some attempts getting it to work in LibreOffice Calc on my Linux desktop but got stuck really fast. The challenges are

  • Connecting to the intervals API with basic authentication (user: “API_KEY” with password “personal API key”)
  • The data comes in as EN-US formatted, comma separated values. That’s fine if your regional settings are EN-US but in Europe, that’s immediately a mess because we use comma as a decimal separator. I used to Find/Replace the comma delimiter by a semi-colon as a first step. In Europe, csv’s are usualy delimited with a semi-colon for that reason. In Excel it is handled pretty easily with the Power Query Editor. Don’t know how Google sheets handle that.
  • The calcualtions and formula’s are pretty straightforward. There should not be much work for that
  • The graph building is plenty of workarounds to overcome Excel limitations. The most difficult in my opinion is building a background with zones that are colored differently. For Excel I found a tutorial, thanks to the example Gerald gave me: Shaded Quadrant Background for Excel XY Scatter Chart - Peltier Tech

Wishing you the best of luck and don’t hesitate to ask questions for a better understanding of the logic and functionality of the chart.

1 Like

The API works, thanks to another Intervals’ user. I’ll find his name and give credit, as there is a Next Activity suggestion in the file. I have been able to add to it, just like the current Excel file works.

1 Like

I’m a Mac user as well and found similar issues, could you send me the Google sheets link as well please?

2 Likes

The link to the Google Sheets version is:

@William_Barnes created, or shared, a Next Activity file with the script for getting the Activity data through the API (thanks William). Note that this file will not work in Excel, due to the script. I’ve add the link to get the Wellness data, and then added the ATP and iThlete HRV information.

Make a copy for yourself, then type these into the red blocks on the Daily Record tab your [athlete ID] and the [API key] which can be found in the settings page. Then click on the Import data button and wait for the data to populate in the Activities and Wellness tabs. If anything needs to be updated, let me know, and I’ll make the necessary changes.

The graphs are missing, as Google Sheets doesn’t have the same BI capabilities as Excel, but this doesn’t mean that it can’t be done. If you are able to get working graphs, please go ahead. When I get a chance, I’ll see if I can work on an alternative plan.