Quick script to read an exported Apple Health Data(XML format) and produce various statistics about activity and workouts.
I built this because I wore my Apple Watch every day during 2020, and wanted to quickly be able to produce year-end statistics.
You'll need to export your Apple Health Data first; I was able to do so using my iPhone and then AirDropped it to my Macbook.
- Open the Health app on your phone.
- Click on your Profile picture in the top right corner.
- Scroll down to "Export All Health Data" and press.
- Wait.
- Airdrop the archive to your laptop and unzip it.
- The file you'll want to pass into this script is named
export.xml
.
Right now, this script simply aggregates workout data by workout type.