A library to parse, wrangle and plot Apple Health data.
Project description
ipyhealth
ipyhealth is a Pythoon3 library to parse, wrangle and plot Apple Health data from all Apple devices.
ipyhealth makes it easy for developers to obtain the Apple Health data, saved as four pandas dataframe:
Samples: data that is recorded at a specific time, including HKQuantitySample (height, heart rate, energy consumed, etc.), HKCategorySample (user in bed, asleep, or awake) and HKCorrelation (food and blood pressure).
Workouts: dataframe containing type (Walk, Run, Hike, Yoga, etc.), duration, energy burned and distance of a recorded workout.
Activity Summary: dataframe containing the move, exercise and stand data for a given day.
Routes: dataframe containing the location of the route file (.gpx file exported), the latitude, lonitude and elevation at different points of the route.
© ipyhealth contributors 2020 (see AUTHORS) under the MIT license.
Installation
Install using pip with:
pip install ipyhealth
Or install from Github using:
pip install git+https://github.com/mereldawu/ipyhealth.git
Usage
from ipyhealth.parser import AppleHealthParser
health_data = AppleHealthParser('/location/to/apple_health_export')
type(health_data.records) # pd.DataFrame
type(health_data.workouts) # pd.DataFrame
type(health_data.activities) #pd.DataFrame
type(health_data.routes) #pd.DataFrame
To export Apple Health data
Download and extract the Apple Health data to a desired location:
On your iPhone, open Health App.
Click on your avatar > Scroll to the bottom > Export all health data.
Select Save to Files (save at a location where you can read it).
Unzip the export.zip folder, which contains apple_health_export folder:
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
History
0.1.0 (2020-05-14)
First release on PyPI.
0.1.1 (2020-05-14)
Add readthedocs
Add badges on build and docs
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for ipyhealth-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1216c9e6fa7b7ff57f472318f1e1c46a79ea337ee37da77ebe0869aa8ef7017 |
|
MD5 | 6d3909badfe2f8c64909dad8f26a88f2 |
|
BLAKE2b-256 | ca5f57a71ca86f2312b18131215a8918977e445abeb2241090d7a49901e5cdca |
Hashes for ipyhealth-0.1.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9afd615b6b388161a12ed09a120b149c28a823a6d81ad5780faf5bbd3c5b7a44 |
|
MD5 | a0accd511b188461c324281dd8dcecd6 |
|
BLAKE2b-256 | d0dfc280df8a3024659ce4a2737eace029578d5a1a6f76292f4f585b66f2e027 |