Track time in heart rate zones with Apple Watch?

In the latest iOS & WatchOS, if you “See more” the heart rate chart in a workout in the Fitness app, you can see the tine you spent in each heart rate zone. Are there any plans to track a version of Fitbit’s “Active Zone Minutes” using that data—assuming it’s actually available via the Health API?

Sum of the time in the “fat burn” zone + 2 * time in higher zones across all workouts, IIRC.

1 Like

Hi! Are you asking about tracking the zone times that are recorded in Apple Health (which it will have gotten from wherever, whether that be Fitbit or the Zones app or the Apple Watch or etc.) or about tracking those zone times directly from Fitbit itself, through their API?

From Apple Health!

I use a Fitbit so that I can beemind AZM, but I’d like to switch back to Apple Watch.

Unfortunately it sounds like Apple doesn’t currently make this information available: How to read Apple iOS 16 Heart Rat… | Apple Developer Forums

Okay, for what it’s worth, I just confirmed that a query like this:

HKStatisticsCollectionQuery(
  quantityType: HKObjectType.quantityType(forIdentifier: .heartRate),
  options: .discreteMin,
  intervalComponents: DateComponents(minute: 1),
  …
)

will return your minimum heart rate over 1-minute periods. The samples are spaced pretty far apart, except during workouts, when there’s data for every minute.

Combined with the dateOfBirth characteristic, and another query for restingHeartRate, you have enough information to calculate heart rate zone thresholds using the same algorithm as Fitbit, and with that you can calculate Active Zone Minutes!

In case anyone who maintains the Beeminder iOS app is reading…

1 Like

I agree this looks possible, but it’s a tonne more engineering work than what we need to do for most metrics, and getting behaviour to line up with Apple has proved surprisingly tricky on other similar metrics (eg sleep).

Which is to say, pull requests would be very welcome!

2 Likes