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 

Typical Output:

<snip>
40 2024-10-06 Sun 56422 221.4   75.6  138.5 
41 2024-10-13 Sun 71459 221.3   72.1  141.8 
42 2024-10-20 Sun 63857 221.0   71.5  142.0 
43 2024-10-27 Sun 56016 221.5   71.3  142.8 

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
  • 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.

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

- John Arrizza