Apple Health Step and Distance Extractor
Please cite using DOI: 10.13140/RG.2.2.18601.70247
This program extracts daily step and distance data from the exported zip file from the Apple Health App. Instructions to retrieve the raw data from the app are in the included pdf file.
Apple Health writes the data in epochs of various lengths of time. Data in epochs that pass through midnight local time are counted all in the second day.
To use the program, run it in Matlab. You will be asked to select the zip file from Apple Health containing the raw data that you want to extract from. Do not modify the files inside the zip. Do not have any xml files in the directory of this m file. The program will unzip the file and open the xml data. It then parses through the xml file to extract the desired data: steps and distance. The outputs of the program are vectors "distlist" and "steplist". The first column of each is the date in YYYYMMDD format. The second column is the distance in miles and number of steps, respectively.
-----
As of this version, the program works with an iPhone 6 using iOS 10.3.2. No guarantee is made about functionality with future versions of iOS or iPhones.
Cite As
Joseph M Mahoney (2024). Apple Health Step and Distance Extractor (https://www.mathworks.com/matlabcentral/fileexchange/63700-apple-health-step-and-distance-extractor), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.