Skip to content

About

Memair Data Types

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Memair Data Types

The types Memair records are chosen from: biometrics, digital activities, emotions, journals, medication forms, physical activities and recommendations. Memair loads these files with FrozenRecord, and its GraphQL API serves them.

Please submit a PR if you would like a new data type added. A type's id is stored with every record of that type, so an id never changes and is never reused.

Apple Health

A type with a healthkit key is one the Memair iPhone app can import from Apple Health. The app reads these mappings from the API, so a new mapping reaches it without an app release, as long as it uses a kind the app already imports.

File Key Meaning
biometric_types.yml quantity The HKQuantityTypeIdentifier raw value.
unit The HKUnit string the value is read in. It must give the value in the type's unit_symbol.
multiplier What the value is multiplied by. HealthKit gives percentages as fractions, so percentages use 100.
physical_activity_types.yml workouts HKWorkoutActivityType raw values.
category, values An HKCategoryTypeIdentifier raw value, and the category values that mean this activity. Without values, every sample of the category does.
emotion_types.yml state_of_mind_labels HKStateOfMind.Label raw values.
medication_forms.yml general_forms HKMedicationGeneralForm case names.

Each Apple value belongs to one type at most. A cumulative quantity, such as steps, is imported as one record per day, so the types it maps to are daily totals. Every workout activity type and every State of Mind label that the iOS 26.2 SDK defines has a type. Where Apple's medication form does not say how the medication is taken, the mapping takes the common case: drops are eye drops, an injection is subcutaneous, and a spray is nasal.

An Android app would add a healthconnect key the same way.

Other phone sources

The iPhone app also records from two other frameworks. Each has its own key, read the same way as healthkit.

File Key Meaning
physical_activity_types.yml coremotion.activity The CMMotionActivity property that is true during this activity: walking, running, cycling or automotive.
digital_activity_types.yml photos.media_type The PHAssetMediaType case of the photos and videos that mean this activity: image or video. Only the time an asset was made is recorded, never its content or location.

Each value belongs to one type at most. stationary has no type, because a phone at rest would record most of the day.

About

Memair Data Types

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors