npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ahcd

v0.0.7

Published

Apple Health Care Data convert xml to csv

Downloads

22

Readme

npm version Node.js CI

ahcd

Apple Health Care Data convert xml to csv

Introduction.

Are you using the iOS app Health? If you're one of those people, your health data, such as your weight, sleep duration, and steps, is might recorded on your Apple Health app. The app shows some graph and visible data on the app, but why don't you want to analyze the data yourself. there are many forms of data analysis and data visualization. In this repository , I'd like to use a spreadsheet application like Excel or Google Sheets to csv output for analysis. I'm going to show you how to do this with I created a CLI.

How to extract Apple health data.

First, take a look at this

  • Open Health on your iPhone.
  • Tap the profile icon in the top right corner.
  • Scroll to the bottom of your health profile and tap "Export All Health Data".
  • Tap "Export" to confirm you want to export the data and start the export process (may take some minutes to complete)
  • Save the extracted file to your local computer or Google Drive

extracted files.

image.png you are going to use the export.xml in the context

Nodejs Environment Settings

Please build a local Nodejs environment by referring to the following links

How to install the command

Install the command ahcd

$ npm i -g ahcd

Usage.

$ ahcd                                                                                                                                                                                                
================================================================================
Apple Health Care Data convert xml to csv

Author     : Fumikazu Fujiwara 
Homepage   : https://github.com/freddiefujiwara/ahcd#readme
LICENSE    : MIT
Report bugs: https://github.com/freddiefujiwara/ahcd/issues
================================================================================

Usage: ahcd [-h] <file> [-t <type>] [-d <dir>]
  • The <file> argument must be export.xml which I mentioned.
  • -t outputs only a specific csv (e.g. -t BodyMass)
  • -d specifies the directory to output to (e.g., -d /path/to)

Demo

$ ahcd -d . export.xml                                                                                                                                                                                
Read export.xml
Analyze export.xml
Wrote . /Height.csv (1 records)
Wrote . /HeartRate.csv (87 records)
Wrote . /BodyMassIndex.csv (50 records)
Wrote . /BloodPressureDiastolic.csv (165 records)
Wrote . /BodyMass.csv (51 records)
Wrote . /BodyFatPercentage.csv (50 records)
Wrote . /FlightsClimbed.csv (1045 records)
Wrote . /BloodPressureSystolic.csv (165 records)
Wrote . /SleepAnalysis.csv (1193 records)
Wrote . /StepCount.csv (12032 records)
Wrote . /DistanceWalkingRunning.csv (13631 records)

Finally

Now you can analyze it in a sheet such as Excel and google sheet. Also, ahcd is welcome to pull request Thanks for reading the final part of the article