Details for Last three days heartrate.ipynb

Published by sprague

Description

A simple test of the Open Humans Apple Health download app. This is an R notebook that will plot the last three days of my heart rate and resting heart rate.

0

Tags & Data Sources

heartrate OH Data Port for Apple Health

Comments

Please log in to comment.

Notebook
Last updated 2 months ago

Attaching package: ‘dplyr’

The following objects are masked from ‘package:stats’:

    filter, lag

The following objects are masked from ‘package:base’:

    intersect, setdiff, setequal, union


Attaching package: ‘lubridate’

The following objects are masked from ‘package:dplyr’:

    intersect, setdiff, union

The following objects are masked from ‘package:base’:

    date, intersect, setdiff, union

Parsed with column specification:
cols(
  hr = col_double(),
  date = col_datetime(format = ""),
  type = col_character()
)

Notebook
Last updated 2 months ago

In [1]:
library(dplyr)
library(lubridate)
library(ggplot2)
Attaching package: ‘dplyr’

The following objects are masked from ‘package:stats’:

    filter, lag

The following objects are masked from ‘package:base’:

    intersect, setdiff, setequal, union


Attaching package: ‘lubridate’

The following objects are masked from ‘package:dplyr’:

    intersect, setdiff, union

The following objects are masked from ‘package:base’:

    date, intersect, setdiff, union

In [2]:
hr <- readr::read_csv("https://open-humans-production.s3.amazonaws.com/member-files/direct-sharing-453/f883101a-95fa-11ea-abe6-8ec31bf08898/heartrate_samples1589471572564.csv?AWSAccessKeyId=AKIAIKNTFUJJTNS6N7HA&Signature=4IENSET93GSL2E%2BdhH9FCBb5VNo%3D&Expires=1589475383", col_names=c("hr","date","type"))
Parsed with column specification:
cols(
  hr = col_double(),
  date = col_datetime(format = ""),
  type = col_character()
)
In [3]:
ggplot(data=hr %>% dplyr::filter(date>today()-days(3)),aes(x=date,y=hr,color=type)) + geom_line()
In [ ]: