This story was originally published on HackerNoon at:
https://hackernoon.com/how-i-decoded-my-apple-watch-metrics-taking-a-look-at-the-raw-numbers-part-2.
Learn how to parse Apple Health XML & GPX files. A technical guide to "streaming" large CDA files and extracting workout kinematics using Python.
Check more stories related to data-science at:
https://hackernoon.com/c/data-science.
You can also check exclusive content about
#data-science,
#python-notebook,
#python,
#apple-watch,
#apple-health,
#prediction-delta,
#health-data,
#apple-wearable-data, and more.
This story was written by:
@farzon. Learn more about this writer by checking
@farzon's about page,
and for more stories, please visit
hackernoon.com.
Exporting Apple Health data results in massive, messy XML files that are difficult to process. By using a "streaming" parser to filter specific LOINC codes and extracting GPS kinematics from GPX files, I converted 300MB of raw records into clean CSVs. This structured data is now ready to be fed into a custom machine learning model to reverse-engineer VO2 Max.