https://github.com/duncantl/RIOSHealth
Read data from iPhone Health app
https://github.com/duncantl/RIOSHealth
Last synced: 5 months ago
JSON representation
Read data from iPhone Health app
- Host: GitHub
- URL: https://github.com/duncantl/RIOSHealth
- Owner: duncantl
- Created: 2022-01-19T01:22:48.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-01-20T03:32:49.000Z (over 3 years ago)
- Last Synced: 2024-08-13T07:12:34.760Z (8 months ago)
- Language: R
- Size: 4.88 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- jimsghstars - duncantl/RIOSHealth - Read data from iPhone Health app (R)
README
# RIOSHealth
I AirDrop the file from my iphone to my desktop and then read the walking data from today
and plot it.```
td = RIOSHealth::himport()
plot(td$startDate, td$value/as.numeric(td$diffHr), type = "b", xlab = "Time", ylab = "Miles/hour", main = Sys.Date())
```We can also read all of the data, not just today's.
```
td = RIOSHealth::himport(today = FALSE)
```The default value for the export.zip file to read is customized to my way of reading the files.
I have a script that moves the export.zip from the Downloads directory and rename it in the current
working directory with the current date as part of the name, e.g., export_01-18-22.zip,
i.e. export_%m-%d-%y.zip where %m, %d and %y are the month, day and year (as numbers.)
If that file doesn't exist, it looks for the most recent export.zip file in the ~/Downloads directory,
accounting for download numbering, e.g., export-2.zip.You can specify the path to the file directly.