Johannes Kaindl Uplink Deutsch

Health Vitals

Apple collects health data for years and hands it over on request — as a single XML file, which in my case is 2.59 GB. At first there is nothing you can do with it. No editor opens it, no spreadsheet swallows it, and the obvious analysis services want exactly the data you would least like to give them.

Health Vitals is an Obsidian plugin that breaks this export down inside your own vault: steps, resting heart rate, weight, sleep, workouts — as tiles, trends and tables, next to your own notes. The data does not leave the computer.

Why this one

The interesting part is not the chart but the way there. A 2.59 GB file cannot be read in and then looked at — it has to be understood as it flows past. The parser reads the export as a stream and condenses it into daily bundles as it goes; whatever has been read is forgotten immediately. This turns 5.7 million individual measurements into 2.6 MB of aggregate, which can then be worked with.

The second decision is a boundary: everything that computes knows nothing about Obsidian. Summarising time series, translating curves into coordinates, formatting numbers for export — these are pure functions with no knowledge of the interface that later draws them. What knows the interface, in turn, does not compute. This separation is the reason the plugin can be tested at all without starting Obsidian.

Under the hood

No charting framework: the curves are hand-written SVG, because a chart library brings more weight than the part you need from it. Colours come exclusively from Obsidian's theme variables — the plugin looks as if it belongs in every theme because it brings no colours of its own.

Anyone who wants to reuse the numbers gets them as a Markdown table or CSV — to the clipboard or as a file in the vault. There is a subtlety in this that you only notice on second look: what looks good on screen (1.500 with a German thousands separator) a spreadsheet may read as 1.5, depending on its language, and the English 1,500 even splits the cell in a comma-separated file. Display and export therefore keep the numbers separately — the same quantity, two representations.

Beyond the browser

Repository

git.jkaindl.de/jkaindl/health-vitals Mirror: github.com/johannes-kaindl/health-vitals Listed in the Obsidian community store.