Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discrepancy sleep data in calculations different stages and summary

ANSWERED

Hi,

 

We are implementing sleep data using the REST Web API. What we've noticed is that the sums of the individual logs for different sleep stages does not match the summary as given in the Fitbit mobile app or dashboard.

 

The data which gets returned in the API matches the data from the graph so that seems to be all good.

For instance the data as seen below for 11 december: https://prnt.sc/22t2zsx and https://prnt.sc/22t37au

The summary shows 39 minutes minutes in the REM stage but it should be 42.5 minutes according to the data coming from the API and as shown in the graph. How is this possible? Are there margins or accuracy faults I need to take into consideration?

 

Thanks!

Best Answer
1 BEST ANSWER

Accepted Solutions

Hi @ottomania 

 

When hovering over the graph, we are providing the total time the user was in REM sleep.   This is the equivalent of totaling the REM values in the levels: [data] section of the JSON response.  However, this does not give an accurate picture of a person's sleep patterns.   A person has short periods of time where they enter a wake stage that occurs during the other stages, such as REM.   The 39 minutes that you're seeing is the total time in REM stage minus the short wake periods that overlap.   For more information on how the sleep data is calculated and returned in the JSON response, see Interpreting the Sleep Stage and Short Data.   

Gordon

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google

View best answer in original post

Best Answer
0 Votes
2 REPLIES 2

Hi @ottomania 

 

When hovering over the graph, we are providing the total time the user was in REM sleep.   This is the equivalent of totaling the REM values in the levels: [data] section of the JSON response.  However, this does not give an accurate picture of a person's sleep patterns.   A person has short periods of time where they enter a wake stage that occurs during the other stages, such as REM.   The 39 minutes that you're seeing is the total time in REM stage minus the short wake periods that overlap.   For more information on how the sleep data is calculated and returned in the JSON response, see Interpreting the Sleep Stage and Short Data.   

Gordon

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes

Hi @GordonFitbit, thanks for your quick reply. That makes sense, thank you for supplying the documentation!

Best Answer
0 Votes