Volunteers Required to satisfy my curiosity (and save my hair)!

ephphy
ephphy Posts: 20 Member
edited November 13 in Social Groups
Hi folks,

Currently the lovely people at Fitbit support are giving me an ulcer from answering my questions with rote replies seemingly without actually comprehending what I am asking. One aspect of my questioning is something I wonder if it is an across the board thing, or unique to me, hence my call for volunteers.

I would like a handful of people (as many as who can/want) who have a Fitbit and a bit of nous to follow the few steps below for delving into your data and report back some findings. Don't worry, I don't want to know your age or weight or anything personal like that.
  1. Choose a day that is fresh in your mind, today or yesterday, and looking at your Fitbit dashboard for that day choose 3 minutes during that day to take as a sample. One minute while you were asleep with the tracker, one minute while you were around the house/office but not too active (not purposely exercising but not at rest, such as cooking dinner or at the photocopier), and one minute while you were in a state of conscious exercise that is normally recorded by the Fitbit, such as a walk or run. Keep the date and minutes in mind for a later step, write them down if needed.
  2. Go to the Fitbit API Explorer https://wiki.fitbit.com/display/API/API+Explorer
  3. In the "Authentication" part of the explorer console that comes up, from the drop down menu select "OAuth1". This begins the process to link the API Explorer with your account - much like when you linked MFP to Fitbit. Follow this through till the API Explorer reloads itself. You will know all is well with the authentication when the Authentication drop down menu displays "fitbit-AuthenticatedUser". Repeat if it doesn't, sometimes the console session expires before the authentication process can complete.
  4. A menu may automatically show up on the left hand side asking to "Select an API Method", if it does, click the arrow in the dark grey bar to hide it again.
  5. Under "Request Url", ensure the first box says "GET" and type/paste the following url in the long box. https://api.fitbit.com//1/user/-/activities/calories/date/YYYY-MM-DD/1d/1min/time/HH:MM/HH:MM.json BUT substitute the date and time with the date you chose before and the sleeping minute (in 24 hour clock) in the format shown.
  6. In the "Response" section, scroll down till you see "activities-calories-intraday", where it will list level, mets, time and value. The number next to time should correspond with the sleeping minute you chose before. Take note of the number next to mets - this is the information I would like you to share.
  7. Repeat the previous two steps until you have the mets value for the three minutes you chose at the beginning.
  8. Come back to this thread and post your findings, stating what model Fitbit you use, and the three mets values, noted by their activity type, for example:
    "Charge, Sleep mets 1, Standing mets 2, Walk/run mets 4"

Ideally I'd like to see at least two sets of results from each device (please differentiate between Charge and Charge HR!). Thank you in advance for any time you spend helping me to see if I'm alone or if the numbers I'm seeing are absurd across the board.



If you're new to using the API Explorer and like and understand what you've seen, open up the menu that we closed earlier in the steps to see what else you can find out! The Explorer was a fundamental tool for me in setting up a private google sheets file taking information I want out of each day's data (rather than what is seen on the Dashboard).
If you're unsure what is meant when we talk of mets, check out en.wikipedia.org/wiki/Metabolic_equivalent
If you're excited about the Intraday data, it is only accessible through the API Explorer unless you have Partner access to the API. I've heard this is relatively easy to get, but I've not personally tried. Click the link "Partner Feature" above the Explorer console for more information about this and what else you can get the Intraday to report.

Replies

  • heybales
    heybales Posts: 18,842 Member
    The METS values are common ones used by many sites that have databases - Fitbit and MPF included. Should vary for anyone, except the slowly moving and the exercise level, because unless you know the pace, you really can't compare.

    You are given 1 MET, or BMR level burn, for all non-moving time, so no steps.
    That is actually underestimated when you are awake, or standing with no steps - because you actually burn more than BMR.

    All other METS are merely the result of perceived pace per minute, pace being calculated from stride length and time.

    The problem here is 1 MET is supposed to be RMR level burn, awake non-moving. Sleeping would normally be 0.9 MET. Standing would be more than 1 MET.

    https://docs.google.com/viewer?a=v&pid=sites&srcid=ZGVmYXVsdGRvbWFpbnxjb21wZW5kaXVtb2ZwaHlzaWNhbGFjdGl2aXRpZXN8Z3g6MjgyY2EyMzQzNWFlN2Q3OA

    The formula used for walking/running is what lead to those table entries for the various speeds. Speed is in meters per minute.

    Walking: METS = (0.1 x speed + 3.5) / 3.5
    Running: METS = (0.2 x speed + 3.5) / 3.5

    METS of course x the BMR they are using, found in the daily burn graph per 5 min, leads to your calorie burn.

    Let's see if my last run after 3 weeks of no running using their stats plays out right.
    Was actually a combo jog/walk routine since 3 weeks since last run, so this won't be totally close, because it does per min calculations, perhaps even per stride perceived.
    I just know for VAM time, it must be the whole minute.

    11.89 miles = 19135.1 meters / 138 min = 138.6 m/min

    (0.2 x 138.6 + 3.5) / 3.5 = 8.92 METS

    Fitbit BMR 6.4 cal / 5 min = 1.28 x 8.92 METS = 11.42 cal/min x 138 min = 1576 calorie burn.

    It reported 1717. So off by 141 calories.

    That always happens though when you attempt to average out jogging / walking intervals based on total time, instead of each segment by itself. I've done the math in the past to prove that out.

    Of course the distance was off too, actually 11.16 by GPS, so that's part of it.

    And you don't have to actually go through the API to get this data.

    Just look at the 5 min daily graph of calorie burn.
    Divide by the non-moving calorie burn, there's your METS value that was used for whatever you did.

    So for me, walking around the store 15.8-16.8 / 6.4 = 2.5-2.6 METS.
    My last run already had the calorie burn overwritten by more accurate estimate, so don't know what they had for the running segments, but above shows math for the run in total, so 8.9 METS.
  • ephphy
    ephphy Posts: 20 Member
    Thanks, still curious to what the API reports the METS to be for you for those minutes though...

    I am not disputing what you're saying at all, please know that, it is in line with what I know and have learned elsewhere. I'm not trying to compare one man's running METS with another man's, my goal here is to see if what the API reports is within an expected range for a run - that is something above 6. This is my goal because I want to find out if I'm the only one with ridiculous entries showing in the API or if it's a blanket case of Fitbit saying it's METS as we know it when it's really METS^-245.478 or something strange like that, and if that is the case it's misleading of Fitbit to refer to that measure as METS.

    Using the math in your example, my last recorded walk had METS of 2.5, as expected as it wasn't vigorous, but the calories for the 12 minutes with that math = 45, Fitbit reported 98. Using a longer more vigorous walk, METS of 3.17 calorie burn calculated to be 400, Fitbit reported 904.

    If for curiosity sake I worked backwards from the reported calorie burn to see what METS that throws up, it comes back as 5.44 and 7.17 respectively. Knowing what I know of those METS tables and my personally perceived effort during those walks, the METS in the previous paragraph would be the ones I'd take as the next best thing to gospel before I took these ones.

    So going into the API, for the shorter walk I would hope to see the API report METS of around 2.5, but wouldn't be surprised if it was around 5.44 because of the calorie burn seen. But no, what I see in the API is nowhere near either of these numbers.
  • heybales
    heybales Posts: 18,842 Member
    Are you using a HR device that is using HR formula rather than METS?

    I'd like to help you out, but I get following response
    Invalid signature or token

    And that is with url link of
    https://api.fitbit.com//1/user/-/activities/calories/date/2015-02-27/1d/1min/time/05:30/05:30.json

    And successful authentication.
  • ephphy
    ephphy Posts: 20 Member
    Thanks for trying to help.

    No HR, just a lowly Flex

    Argh. Superfluous "/" between .com and 1. Sorry, my fault.

    So you'd be trying https://api.fitbit.com/1/user/-/activities/calories/date/2015-02-27/1d/1min/time/05:30/05:30.json
  • heybales
    heybales Posts: 18,842 Member
    So here are my results. Now, the GET is pulling 1 min, the graph data I reference is the total for the 5 min, which 1 min could indeed have been more, and it may not have been the first of the 5 min chunk of time.

    non-moving time - 6.4 / 5 min in graph = 1.28
    "level": 0,
    "mets": 10,
    "time": "05:30:00",
    "value": 1.270400047302246

    Slow moving time - 10.7 / 5 min in graph = 2.14
    "level": 1,
    "mets": 30,
    "time": "11:55:00",
    "value": 3.811199903488159

    Fast moving time (not running) - 22.6 / 5 min in graph = 4.52
    "level": 1,
    "mets": 28,
    "time": "17:30:00",
    "value": 3.5571200847625732

    Wanted figures that almost doubled each time.

    Nope, can't make heads or tales of that, since that's not want counted as calories, nor as METS, because I got Active Minutes on that last entry, meaning over 3 METS.
  • ephphy
    ephphy Posts: 20 Member
    Great, so it's not just me. During the two walks I referenced before, the API was showing a max mets/min at 74. It consistently shows mets of 10 when the tracker is on the charger.

    See what I mean about a misleading label? I tried asking support whether to them mets = METS (as we know it), and asking why it defaults to a mets value of 10, but the response is "check the wiki link to learn about METS" and "when you do an activity you get a higher METS value" despite telling them there is no activity being done to get that higher value.

    I realise that the mets being reported is something that doesn't really effect the bottom line of other metrics reported, as my rest 1.5cal/min (taken from the graphs- but close enough to the value with 15dp in the api) at 74 mets would be a burn rate of 111 cal/min, which while awesome I doubt is true and is far from the calorie burn reported. The dashboard graph shows a peak 99cal/5mins. Add the confusion from this to other anomalies I'm seeing in data and trying to seek information/reasoning for, and getting rote answers from Fitbit support are driving me nuts.

    As an aside, as far as I can tell, Level 1 = Lightly Active, 2= Fairly Active 3= Very Active Mins.
  • heybales
    heybales Posts: 18,842 Member
    I was half guessing that the METS value had an assumed decimal point in there.

    Here's the pull from a run where I manually logged my calories.
    This 5 min block was 51.9 / 5 = 10.38 cal/min / 1.27 = 8.2 METS
    "level": 3,
    "mets": 82,
    "time": "17:00:00",
    "value": 10.381327629089355

    Now this one works out, but sadly it matches exactly my manually logged workout.

    But it shows the decimal is assumed in the 8.2, and they used the 1.2704 resting calorie burn from step above where METS was 10, but obviously 1.0 then.

    So I'm betting this is merely an issue of viewing the per min time this way, but on the site you only get 5 min block to compare to.
    So this min seen from live data could be very different from the next, and the average works out to be reasonable.

    When I looked at my prior example last time block, and change minutes to :31 and :32 ect, they all had the non-moving stats for those minutes.
This discussion has been closed.