Imports Apple Health Data into InfluxDB.
Visualizing InfluxDB using Grafana.
- Go to the Health App
- Tap the profile image at the top right
- Tap "Export Health Data"
- Save the
export.zip
file and extract its XML contents (export.xml
) somewhere accessible by this script.
Expand instructions
This is the easiest way to get up and running quickly. This will spin up the importer, an InfluxDB database, and Grafana with a default dashboard ready to go.
- Docker with Docker Compose
- Create a
data
directory at the project root and add theexport.xml
inside it
docker-compose build
docker-compose up
(add-d
to run in daemon mode)- Access Grafana in your web browser: http://localhost:3000
Username: admin
Password: admin
- Replace
data/export.xml
with a new version docker-compose run importer
Expand instructions
pip install -r requirements.txt
- Rename
config_sample.yml
toconfig.yml
- Edit
config.yml
to match your InfluxDB settings (host, auth, etc.)
- Export Health Data from iOS device
python3 import.py export.xml
python import.py --help
Expand instructions
- Create a
data
directory at the repo root and add theexport.xml
inside it.- (note that this can be anywhere if the volume mount point on the
docker run
command is changed)
- (note that this can be anywhere if the volume mount point on the
- Edit
config.yml
to match your InfluxDB settings (host, auth, etc.)
docker build . -t twstokes/healthdata_influx
docker run -v $PWD/data:/data:ro -v $PWD/config.yml:/app/config.yml:ro twstokes/healthdata_influx
- Does not currently support "Mindful Sessions"