Imports Apple Health Data into InfluxDB.

- Go to the Health App
- Tap the profile image at the top right
- Tap "Export Health Data"
- Save the
export.zipfile 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
datadirectory at the project root and add theexport.xmlinside it
docker-compose build
docker-compose up(add-dto run in daemon mode)- Access Grafana in your web browser: http://localhost:3000
Username: admin Password: admin
- Replace
data/export.xmlwith a new version docker-compose run importer
Expand instructions
pip install -r requirements.txt- Rename
config_sample.ymltoconfig.yml
- Edit
config.ymlto 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
datadirectory at the repo root and add theexport.xmlinside it.- (note that this can be anywhere if the volume mount point on the
docker runcommand is changed)
- (note that this can be anywhere if the volume mount point on the
- Edit
config.ymlto 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"