Follow this post from the Quantified Self blog
- DO step 1
- SKIP steps 2 and 3
- DO step 4. Use these:
- Consumer key
: 2ccdced480d247828c30a8ee0626636d
-
Consumer secret: ac564afc15aa4cc990c72623794bdf28
- DO steps 5 and 6
Graphing 101
- Okay now you have data in a Google spreadsheet. Let’s graph it.
- Select the first and second columns
- Navigate to Insert –> Chart –> line charts option
Graphing 102
- Open Excel
- Highlight first 3 columns
- Navigate to Insert–>Scatter–>Scatter with Straight Lines
- Right click on chart –> Select Data…
- Edit steps and distance. Each should have dates as X values, and steps or distance as Y values
- Okay that’s better, but we need to change the Y axis values for the distance data
- Right click on the green line at the bottom that represents the distance data and choose –> Format Data Series…
- Much better! We can see how my steps and distance are almost completely overlapping.
The Mifflin-St Jeor eqn is used to calculate calorie burn. We then take tracker data and factor that in as well for the users daily calorie burn totals. The exact “math” is not public.
- M. Mifflin, S. St Jeor, L. Hill, B. Scott, S. Daugherty, and Y. Koh, “A new predictive equation for resting energy expenditure in healthy individuals,” The American Journal of Clinical Nutrition, vol. 51, no. 2, pp. 241 -247, Feb. 1990.
If a user had no Fitbit tracker data for the specific day we take the greater of Logged Activities + BMR (for minutes when there is no activity) and the calories calculated from the EER for that day (if EER enabled for this user’s profile). In case, there was some data from the tracker for the specific day, we use that data where available and for time where data is unavailable we use BMR. If the total is less than 20% greater than BMR then we use EER (cals < EER * 0.8). EER never used to calculate calories for today.
BMR Formula: We use standard MD Mifflin-St Jeor equation:
9.99 * weightKg + 6.25*heightCm – 4.92*ageYears + s, where s is +5 for males and -161 for female
EER Formula (TEE total energy expenditure):
Based on http://www.cdc.gov/pcd/issues/2006/oct/pdf/06_0034.pdf which in turn is based on “Food and Nutrition Board. Dietary reference intakes for energy, carbohydrate, fiber, fat, fatty acids, cholesterol, protein, and amino acids (macronutrients). Washington (DC): National Academy Press; 2005.” http://www.nap.edu/openbook.php?isbn=0309085373&page=204
MALE: TEE = 864 – 9.72 x age (years) + 1.0 x (14.2 x weight(kg) + 503 x height (meters))
FEMALE: TEE = 387 – 7.31 x age (years) + 1.0 x (10.9 x weight(kg) + 660.7 x height (meters))
Other Fitbit resources:
http://wiki.fitbit.com/display/API/Fitbit+API
http://dev.fitbit.com/:
http://github.com/qdot/libfitbit (also see http://www.openyou.org/)