07-21-2015 00:40
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

07-21-2015 00:40
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi, this is what I obtain by running
https://api.fitbit.com/1/user/-/activities/heart/date/2015-07-16/1d/1sec.json
dataset: [{“time":"00:00:00","value":70},{"time":"00:00:05","value":69},{"time":"00:00:10","value":68}, ,{"time":"00:00:25","value":68} …. ]
Can you help me to intertpret this result? It means that the heartrate from 00:00:00 to 00:00:05 was 70 bpm, from 00:00:05 to 00:00:10 was 69 bpm and so on?
Thanks al lot!
Floriano
Answered! Go to the Best Answer.

Accepted Solutions
07-24-2015 15:23
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



07-24-2015 15:23
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@dancoal is correct. When using the second-level granularity, the measurement is the heart rate at the exact point in time specified.
Minute and hour-level granularity for the heart rate time series values are averages of the measurements in the interval.

07-24-2015 15:02
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

07-24-2015 15:02
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Hello, my interpretation of this is that the time values are discrete. This means your heart was 70 at time 0, 69 and 5, with no information on the time between.
07-24-2015 15:23
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



07-24-2015 15:23
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@dancoal is correct. When using the second-level granularity, the measurement is the heart rate at the exact point in time specified.
Minute and hour-level granularity for the heart rate time series values are averages of the measurements in the interval.

07-25-2015 11:08
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

07-25-2015 11:08
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Got data? Get answers at zenobase.com.

07-26-2015 01:33
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

07-26-2015 01:33
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
The documentation says that heart rate is second-level, so i would expect
to know the "true" heartrate every single second.
I would appreciate a comment from anybody of the fitbit staff.
Thank you!

07-26-2015 10:24
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

07-26-2015 10:24
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Got data? Get answers at zenobase.com.

07-26-2015 14:09
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

07-26-2015 14:09
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Cheers.

07-27-2015 06:45
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

07-27-2015 06:45
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
The field, 00:00:00, would be hours:minutes:seconds. And the times in your example are 5 second intervals. At 60 BPM, that means they would see 5 peaks in the pulse. So I expect this is an average of the inverse of the five intervals between beats - with one peak used from the preceeding 5 seconds.
BPM = 60 *( [1/(T1-T0) ]+ [1/(T2-T1)] + [1/(T3-T2)] + [1/(T4-T3)]+ [1/(T5-T4])/5
If the pulse were 120 BPM, then the average would be built from 10 peaks.
(120 peaks per minute/60 Seconds per Minute) = 2 peaks per second
2 peaks per second*5 seconds = 10 peaks.
Build a table of synthetic heart beat timings and you can convince yourself that you would need to keep a running sum of the inverse of the intervals. When the cumulative time (sum of intervals) exceeds a multiple of 5 seconds: divide the sum by the number of intervals and multiply by 60. Set the first time to the last time, set the sum to zero, set the count to zero. Wait for the timer.
Of course, Fitbit would serve the data community better if they just reported the stream of peak times in milliseconds or finer resolution. Then we could calculate our own, including heart rate variability.
They truncate the time to the nearest second and the pulse to nearest beat. The raw data is hopefully more accurate.
I built an Excel spreadsheet with synthetic heart beat data to show you, but there is no way to attach it to this message.
07-29-2015 09:00
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

07-29-2015 09:00
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
1) Coud you please post the formula you use to calculate second-level HR? It would like to calculate an approximation of RR intervals from HR, and the formula will help e a lot
2) Are you going to provide an API for RR intervals in the future?
Thanks again!

07-29-2015 16:32
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



07-29-2015 16:32
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@caplina: I don't have anything to share at this time regarding those, but your request is appreciated and noted.

07-29-2015 16:50 - edited 07-29-2015 18:45
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

07-29-2015 16:50 - edited 07-29-2015 18:45
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
For someone new to the API area, can you explain what he just asked? What is second level HR data?
I presume he asked for documentation related to the API workings and data interpretation. What is Fitbit's policy on sharing information?
Is there any documentation on the API? Is there a wiki somewhere that explains it? Are there code samples to use? Any help for a newbie? Any FAQ's? Something?

07-29-2015 17:05
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



07-29-2015 17:05
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@RichardCollins wrote:
For someone new to the API area, can you explain what he just asked? What is second level HR data?
The documentation for the second-level heart rate data is at https://wiki.fitbit.com/display/API/API-Get-Intraday-Time-Series
Second-level heart rate data is the heart rate as displayed on a Fitbit device at a particular second in time.
RichardCollins wrote:
I presume he asked for documentation related to the API workings and data interpretation, and you told him to take a hike. Is that what happened?
That is not what happened. Please be considerate in your tone on the forum.
Regarding caplina's request, Fitbit generally does not share proprietary algorithms and it does not comment on unannounced features.
RichardCollins wrote:
Is there any documentation on the API? Is there a wiki somewhere that explains it? Are there code samples to use? Any help for a newbie? Any FAQ's? Something?

07-29-2015 18:49
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

07-29-2015 18:49
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Thank you for the pointers. That answered my questions. I edited my post. I did not intend to hurt your feelings.

