11-17-2015 17:26 - edited 12-06-2015 13:34
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

11-17-2015 17:26 - edited 12-06-2015 13:34
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi,
I have found that there is a rounding issue with data coming from the timeseries endpoint when compared to the intraday data. The API looks like it is flooring the sum, while the graph on the dashboard looks like it is ceiling the sum.
In the application I work on, we store the data locally so that we can present graphs to our users. Here is 1 data point for 1 user on November 1st of 2015:
mysql> SELECT SUM(STPS), SUM(DSTNC), SUM(CAL_OUT) FROM omd_usr_sonoa_ftbt WHERE DATAPT_TS = '2015-11-01'; +-----------+--------------------+--------------+ | SUM(STPS) | SUM(DSTNC) | SUM(CAL_OUT) | +-----------+--------------------+--------------+ | 17986 | 13.580129999999999 | 3355 | +-----------+--------------------+--------------+ 1 row in set (0.00 sec)
https://api.fitbit.com/1/user/-/activities/log/calories/date/2015-11-01/1d.json
As you can see, there is a slight discrepancy. But it gets worse when there's a lot of data. This is the difference over the month of November 2015 up to the 18th:

- Labels:
-
OAuth 1.0a
-
OAuth 2.0
-
PHP
11-17-2015 19:02 - edited 11-17-2015 19:03
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

11-17-2015 19:02 - edited 11-17-2015 19:03
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
To further confirm, I queried the intraday dataset and ran a sum over dataset, then a floor & ceil to see if the values changed, and they did:
This is the dataset:
{ | 1 <?php "activities-calories": [ | 2 { | 3 $json = file_get_contents(__DIR__ . '/calories.json'); "dateTime": "2015-11-18", | 4 $json = json_decode($json); "value": "1283" | 5 } | 6 $path = 'activities-calories-intraday'; ], | 7 "activities-calories-intraday": { | 8 $sum = 0; "dataset": [

12-06-2015 13:33
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

12-06-2015 13:33
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi team, is there an update for this bug?

12-15-2015 14:59
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

12-15-2015 14:59
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@JeremiahFitbit, @SunsetRunner, have there been any updates to this bug?

