The short answer? A lot of bullshit.

Wherein I feel ways about not being able to script through my own health data

Someone recently posted a nice utility app on HN[1] that rolls up your heart rate zone data for a given time period and compares against your zone goals. It's a super niche need but it struck a nerve with me—I happen to have just started zone training in the last few weeks.

Heart rate zones are a calculated range of 5 distinct beats-per-minute spans (zones) that are set based on your age, max heart rate, and maybe your resting heart rate. For example, my current zone 1 according to Apple Fitness is anything up to 128BPM. Zone 2 for me is 129–140BPM, and so on.

5*N heart rate zones, where N = app

Where are those numbers coming from? Some part of the Apple Watch/Fitness/Health blob determines my heart rate zones automagically.
The problem is that every other app does it automagically too. And each has its own distinct flavor of magic.

Do you know how calendar interop sucks? How getting Google Cal and Apple Cal and Whatever Cal to play nicely with each other is a losing battle? It’s sort of like that but for your heart beats. Strava (hello, fellow runners) has its own way to determine your zones, and so does this other app from HN that I mentioned above.

The result is that each app wants me to train against meaningfully different definitions of what my zones should be. If I target zone 2 in one app, it might be recorded as zone 3 in another.

For better or for worse, I want the Apple Watch/Fitness/Health blob to be my canonical database. I actually don’t care if the zones are finely accurate; as far as I can tell, there are multiple legitimate ways to calculate zones anyways. What I do want is a stable set of data points to work against.

Time to script it?

This is the part of any rabbit hole where I says to myself: “Self, I coulds scripts thats”.

But... it’s an Apple service, so I’m probably not going to be trusted with my own data.

I turned to ChatGPT to confirm my suspicions:
Short answer... a lot.png

This thing knows what choir it’s preaching to!

ChatGPT is frequently wrong about world-facts and very eager to please, so I did some further poking around on my own.

Unfortunately, it seems to have been accurate in this case.

What can I do with my own heart beats?

My understanding of my options:

  1. [Current state] Paste individual workout numbers into ChatGPT, ask it to tally throughout the week as we discuss workout calibrations
  2. Write an ”app” along with all of the crusty Apple layers to tally a single number of my own health data
  3. Do frequent (2–3x/day) manual dumps of my data and handle it all in a spreadsheet or script
  4. Get super hacky with the iPhone Mirroring app by doing some UI scripting to automate the data dumps (probably too much desparate magical thinking here on my part)
  5. Subscribe to an app—assuming I can find one that sets the correct heart rate zones—so it can tally a number for me

For now, this is the end of the line. The current state of pasting my heart zone numbers into my ChatGPT workout chat is ok enough.

I'd sure rather be able to script it though.


  1. I'm not linking to the app here because this post is in no way a critique of the hard work of an indie dev sharing a helpful app. ↩︎