apple-watch-workouts-year-review
apple-watch-workouts-year-review copied to clipboard
Visualize your 2019 activity in a Grafana dashboard
Welcome to Apple Watch Workouts year review 👋
Stability: 1 - Experimental
Visualize your Apple Watch workouts of the year in a Grafana dashboard
✨ Demo
🏗 Install
Clone the repo using Git. You'll need Docker, Node.js (tested with v12) and Yarn (tested with v1.21.1).
yarn install
🚀 Usage
The project runs an InfluxDB database and a Grafana instance, launch them with docker-compose:
docker-compose up -d
In the meantime, export your Apple Watch data from your iPhone. In the Health App:
Send the zip file to your computer.
Then run:
yarn start <path_to_export.zip>
Grab a coffee while your data is read and inserted in InfluxDB (my data takes more than a minute to be loaded)!
📈 Once the script ends, your Grafana dashboard should be available at http://localhost:3000/d/apple-watch-workouts/year-dashboard?orgId=1.
This dashboard is just a proof of concept, take full advantage of Grafana, try to edit the panels and even add yours if you want to!
Please make sure to show me your dashboard on Twitter 😁
❓ Questions
How do I use this with another tracker?
The project has been specially designed for the Apple Watch Health data but it shouldn't be too complicated to do it for another tracker. Just ask me if you want to do it!
How do I replace a chart?
Please go to Grafana documentation and have fun exploring 😊.
Why is my preferred activity not displayed?
Because I didn't take time to find them automatically (cycling, walking, swimming, strength training, running and volleyball are hardcoded). Contributions are welcome!
How do I update my data?
You'll have to export the zip file and run yarn start export.zip
again.
I got an error while running yarn start export.zip
, what should I do?
If you have this kind of error:
throw new Error(`${workoutActivityType} workoutActivityType not handled yet`);
^
Error: HKWorkoutActivityTypeNonExistingActivityType workoutActivityType not handled yet
You'll have to add the workout type to the list in ./lib/mapper.js
, please open a PR if you have to do it.
For any other error, please open an issue (or make a PR if you know how to fix it!).
🚧 Run unit tests
yarn test
Show your support
Give a ⭐️ if this project helped you!
This README was generated with ❤️ by readme-md-generator