{"id":51358487,"url":"https://github.com/vendaface/apple_health_tracker","last_synced_at":"2026-07-02T21:30:59.826Z","repository":{"id":366151310,"uuid":"1275219484","full_name":"vendaface/apple_health_tracker","owner":"vendaface","description":"Turn an Apple Health export into an interactive, self-contained sleep \u0026 respiratory dashboard (hypnogram, SpO2, respiratory rate, breathing-disturbance index) for review with a clinician.","archived":false,"fork":false,"pushed_at":"2026-06-20T12:50:20.000Z","size":631,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-20T14:34:34.474Z","etag":null,"topics":["apple-health","dashboard","data-visualization","echarts","health-data","healthkit","hypnogram","pulmonology","python","quantified-self","sleep-tracking"],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vendaface.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-20T12:07:08.000Z","updated_at":"2026-06-20T12:50:23.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/vendaface/apple_health_tracker","commit_stats":null,"previous_names":["vendaface/apple_health_tracker"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/vendaface/apple_health_tracker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vendaface%2Fapple_health_tracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vendaface%2Fapple_health_tracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vendaface%2Fapple_health_tracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vendaface%2Fapple_health_tracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vendaface","download_url":"https://codeload.github.com/vendaface/apple_health_tracker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vendaface%2Fapple_health_tracker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35064248,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-02T02:00:06.368Z","response_time":173,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apple-health","dashboard","data-visualization","echarts","health-data","healthkit","hypnogram","pulmonology","python","quantified-self","sleep-tracking"],"created_at":"2026-07-02T21:30:55.739Z","updated_at":"2026-07-02T21:30:59.813Z","avatar_url":"https://github.com/vendaface.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# apple_health_tracker\n\nTooling to turn an **Apple Health export** into a self-contained, interactive\n**sleep \u0026 respiratory dashboard** — designed for review with a pulmonary specialist.\nIt pairs sleep-stage data (hypnogram) with the breathing-related metrics in the export\n(blood oxygen / SpO₂, respiratory rate, and Apple's sleeping breathing-disturbance index).\n\n\u003e **Privacy:** this repository contains **code only**. No personal health data is\n\u003e included. The raw export and the generated dashboard (which embed real readings) are\n\u003e git-ignored and never leave your machine.\n\n![Sleep \u0026 respiratory dashboard — rendered from synthetic sample data](docs/demo.png)\n\n*Screenshot above is generated from **synthetic** data (`dashboard/sample_data.py`), not real readings.*\n\n## Quick start\n\n1. On your iPhone: **Health app → profile → Export All Health Data**. Unzip it; you'll\n   get a folder containing `export.xml`.\n2. Send the file to your destination of choice (AirDrop to a Mac, email to yourself, probably don't save your personal health data to the cloud). Note: depending upon how many years you've been collecting data, it could be multiple gigabytes in size.\n3. Place this repo's `dashboard/` folder next to that `export.xml` (or pass a path).\n4. Open a command line environment (Terminal, Command) and build the dashboard:\n   ```bash\n   cd dashboard\n   python3 etl.py        # streams ../export.xml -\u003e data/*.json   (a few minutes)\n   python3 build.py      # inlines ECharts + data -\u003e sleep-dashboard.html\n   ```\n5. Double-click the resulting **`dashboard/sleep-dashboard.html`** to open it in a browser. It's one self-contained\n   file — no server or internet needed — and has a **Print / PDF** button for sharing.\n\n## Dashboard views\n\n- **Single-night detail** — hypnogram (Deep/Core/REM/Awake) with SpO₂ (incl. a 90%\n  threshold line), respiratory rate and heart rate overlaid on a shared, zoomable timeline.\n- **Sleep calendar** — every night shaded by hours slept; click a day to open it.\n- **Trends** — nightly sleep, avg SpO₂, respiratory rate and breathing-disturbance index.\n- **Stage composition** — stacked stage-minutes per night.\n- **Breathing-disturbance focus** — the watchOS 11 apnea-related signal over time.\n\nSee [`dashboard/README.md`](dashboard/README.md) for details.\n\n## Try it without an export (synthetic demo)\n\nNo Apple Health export handy? Generate a realistic, fully synthetic dashboard:\n\n```bash\ncd dashboard\npython3 sample_data.py                                  # -\u003e ../docs/sample_*.json\npython3 build.py ../docs/sample_summary.json ../docs/sample_detail.json /tmp/demo.html\nopen /tmp/demo.html\n```\n\nThis is exactly how the screenshot above was produced — no real data involved.\n\n## How it works\n\n`etl.py` stream-parses the multi-GB `export.xml` with constant memory, groups sleep\nrecords into nights (noon-to-noon), deduplicates overlapping sources (prefers Apple\nWatch staged data), bins overnight vitals, and emits compact JSON. `build.py` inlines\n[Apache ECharts](https://echarts.apache.org/) and that JSON into a single portable HTML.\n\n## License\n\n[MIT](LICENSE) © 2026 Vendaface. Bundled Apache ECharts (`dashboard/vendor/`) is under\nthe Apache-2.0 license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvendaface%2Fapple_health_tracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvendaface%2Fapple_health_tracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvendaface%2Fapple_health_tracker/lists"}