Python Metabolism and Weight data

Overview

PyPi module N/A
git repository https://bitbucket.org/arrizza-public/metabolism-weight
git command git clone git@bitbucket.org:arrizza-public/metabolism-weight.git
Verification Report https://arrizza.com/web-ver/metabolism-weight-report.html
Version Info
  • Ubuntu 22.04 jammy, Python 3.10

Summary

This project is to gather and aggregate data about activity and weight.

Get raw data

Withings Body+ scale

  • Login to Withings Login
  • click on Support in the menubar
  • enter "export data"
  • click on "Privacy - How can I export my data?"
  • click on the provided link "... all of your data at once by clicking this link"
  • click "Start my archive"
  • After a few minutes, you will get an email with a link
  • download the zip file into ~/Downloads
  • extract the data
  • copy these files to metabolism-weight/data
    • weight.csv

The weight.csv should have the following columns:

  • Date
  • Weight (lb)
  • Fat mass (lb)
  • Bone mass (lb)
  • Muscle mass (lb)
  • Hydration (lb)
  • Comments

Samsung Galaxy 4 Watch

  • on your phone, go to Samsung Health
  • go to settings
  • scroll to "Download personal data", click it
  • download the data to your phone
  • plug your phone to your PC via USB-C
  • On "allow access to phone data?" click Allow
  • The phone data should not be mounted on your PC
  • go to Internal Storage/Download/Samsung Health
  • there should be a "samsunghealth_smartthings_"
  • copy these files from folder to metabolism-weight/data (note: very slow!)
    • com.samsung.shealth.activity.day_summary.
    • com.samsung.shealth.calories_burned.details.

Run

./doit
./doit --verbose     # to see the daily data
./doit --year 2025   # only load data for the given year; defaults to 2024
./doit --year all    # load all data

Typical Output:

<snip>
 40 2024-10-06 Sun  62,059   4,661  221.4   75.6  138.5 
 41 2024-10-13 Sun  75,023   6,811  221.2   71.8  142.0 
 42 2024-10-20 Sun  77,305   5,733  221.0   71.7  141.9 
 43 2024-10-27 Sun  59,554   3,688  221.7   71.3  143.0 
 Total steps   :  3,038,807
 Total calories:    216,647

The columns are:

  • week number: from 1 to 53 (see isocalendar())
  • date: this is weekly summary so it will be on Sundays
  • steps: the number of steps for the week
  • calories: the number of calories reported by Samsung Galaxy for the week; It takes 13 - 15 steps per calorie.
  • weight: the value reported by the Withings Scale, in this case pounds
  • fat: the value reported by the Withings Scale, in this case pounds
  • muscle: the value reported by the Withings Scale, in this case pounds

This shows that in the last 4 weeks, I've lost 4 pounds of fat and added 4 pounds of muscle, which results in no weight gain or loss. In the 10 months from Jan 1 to end of October I've walked 3 million steps and burnt over 216,000 calories.

Note the weight, fat and muscle values are an average of values for the week.

- John Arrizza