Is Stand Time in Hours or Minutes?

Hi, what is the Stand Time data type? Apple Health has two very different ones: Stand Hours (how many hours out of the day did you stand at least a minute) and Stand Minutes (how many minutes did you stand in total). Stand Time is ambiguous.

Thinking about this some more, I’d rather see Stand Hours represented as a slightly differently processed metric. Flip it on its head as “Sedate Hours per Day”. Take 24, subtract hours asleep, subtract stand hours, and lastly add one back (double-subtracting from overlap of sleep and stand hours) if both sleep and stand hours are available. Stand Minutes can be used as-is but rephrased as Minutes Standing (or stick with Stand Minutes) to avoid the ambiguity of “Stand Time”.

These are just ideas, of course.

Looking at the data types code I see…

SampleTypeConfig(.appleStandTime, grouping: .activity, statisticsOptions: .cumulativeSum)

Looking at Apple’s docs, appleStandTime is the minutes version, not the hours one. For hours they have appleStandHours, which it looks like I haven’t included in the app.

I guess my reasoning was the two basically did the same thing, but the hours one with lower resolution. So better to only include the higher resolution minutes one.

For almost all data types I’ve gone with Apple’s naming, unless their naming is unusably ambiguous or awkward. This feels like one of those cases! I agree it should probably be manually renamed to “Stand Minutes” rather than “Stand Time”. I’ve done that now:

SampleTypeConfig(.appleStandTime, grouping: .activity, customName: "Stand Minutes", statisticsOptions: .cumulativeSum)

That sounds useful!

Though it does segue into a next feature idea I started speculating on yesterday: multivariate analysis, confounder finding, etc.

A snippet of my brainstorming session with Claude might illustrate that idea best:

I can see this fitting into the Stand Hours + Total Sleep combination. Determining how those interplay with other correlations.

But back to Stand Hours vs Stand Minutes, I’m still on the fence about whether to include both in the app. My instinct is that anything that can be learnt from Stand Hours can be learnt in higher resolution from Stand Minutes. But… I might be misconceptualising there.

There’s no Stand Time in the Apple Health app, but Stand Hours and Stand Minutes (I guess Stand Time is its legacy name).

You can have high Stand Minutes from walking around for two hours, and simultaneously have low Stand Hours from being in potato-sack mode on the couch for three hours later on the day. Stand Hours measure hours of complete sedentariness while Stand Minutes measure … activity while erect? :winking_face_with_tongue:

appleStandTime(ie the minutes version, though it’s I believe measured at seconds resolution) is the newer one, added in iOS 13. The original is appleStandHours which was added in iOS 9.

A bunch of HealthKit data types have different internal names from the names displayed in the Health app. This & That app defaults to using the internal names, unless they’re too confusing or ambiguous.

I guess there is that … “activity within a duration bucket” element to Stand Hours, which Stand Minutes doesn’t capture. Ok I’ll add it in as another data type. No harm in having both!