08-11-2023 03:28
08-11-2023 03:28
Hi everyone.
I have purchased FitBit Inspire 3 to be used in a personal/university project of mine.
The goal, as mentioned in the title is to track calories burned during exercise.
After I complete an exercise and it appears on my FitBit dashboard, when I click on it, I see the following chart, which is exactly what I want to recreate using either exported data from FitBit or a response from an API endpoint.
In this chart we see cals/min values on a per second basis.
I have tried to export FitBit data through Google Takeout, and also export the exercise in TCX format. No such data available, not that I could find at least.
Browsing through the API, I believe the most relevant endpoint for my query would be "Get Activity Intraday by Interval", but from what I see in the Documentation, that would at best take me to minute-level data, not second-level, as we see in the chart in the dashboard.
So, to wrap this up, the short question is, how would one go about recreating a chart as the one above?
Many thanks!
08-11-2023 07:13
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
08-11-2023 07:13
Hi @fitburner
You are correct that the Activity Intraday endpoint will provide you with the calories / min data to recreate the chart. If you notice in the chart, the calories burned over a period of a single minute stays constant. The slider bar is showing seconds but the data over a single minute is still constant. Calories / second is not available. If calories / second were available, you would see the calories burned change over the length of a single minute.
Best,
Gordon
Best Answer08-18-2023 09:32
08-18-2023 09:32
Hi @Gordon-C ,
Many thanks for the quick response.
I've played around a bit with the particular API endpoint, and indeed, I can recreate the chart as envisioned.
I have another question, for which I suspect what the correct answer is, but also wanted to ask your for confirmation.
Lets say that among all other datapoints, I get the following (it's not actual data, I just use random values):
time: 16:41:00, value (calories): 10.57897 (lets call this number A)
The question is, does number A correspond to calories burnt from 16:40:01 to 16:41:00 or from 16:41:00 to 16:41:59?
Many thanks for your consideration
Best Answer08-21-2023 11:58 - edited 08-21-2023 11:59
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
08-21-2023 11:58 - edited 08-21-2023 11:59
Hi @fitburner
From what I can tell, it looks like the calorie burn value comes from the previous period. So, in your example 10.57897 calories were burned from 16:40:01 - 16:41:00.
Gordon
Best Answer