Mac app for Health data analysis?

(gastropod) #1

Now that I finally have my Watch (whee!), the Health app is getting fed and it’s time to figure out what to do with the data.

Is there a Mac app that will swallow exported Health data and let you fiddle with it? I didn’t find anything on the MAS, and all that turned up with a general search so far is a python script to convert the xml to csv plus an example in excel, and with some instructions to import the xml almost directly into R (an open source statistics program with a learning curve). I could live with this assuming it works (it’s over two years old, and aimed at windows users), but if there’s something out there that would do more and is supported, it would save a lot of time (which means it might actually get done!)

I’m not interested in anything that runs on the phone. For two things, the screen is too small and most apps seem to be special, not general, purpose. More importantly, the risk of data leakage is far too high. Walling things off from the intertubes completely makes me happy; trying to remember fiddly opsec always fails eventually.


(gastropod) #2

As a followup, I still haven’t found any pre-rolled apps, but that python script works great to convert to csv. It produces a separate file for each kind of data that has any data, e.g. HeartRate.csv.


export the health data to the mac
unzip the file

copy the script from the article
paste into bbedit or other plain text editor (not a word processor!)
save it as

open Terminal
type 'python' space (no quotes)
drag the script file icon into the terminal window
drag the export.xml file icon into the terminal window
	(Dragging will fill in properly escaped full paths.)
hit return

The command line will look something like this (all on one line):

machine:~ user$ python /Volumes/path/ /Volumes/path/export.xml

The output is in the same folder as your export.xml file.

The script is here:

Now I ‘just’ have to figure out how I want to fiddle with the results.