Skip to content

Instantly share code, notes, and snippets.

@akshat3096
Last active May 3, 2019 07:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akshat3096/56583becedef9a8a6dc6f940aa403173 to your computer and use it in GitHub Desktop.
Save akshat3096/56583becedef9a8a6dc6f940aa403173 to your computer and use it in GitHub Desktop.
step_count <- df %>%
filter(type == 'HKQuantityTypeIdentifierStepCount') %>%
filter(year==2019) %>%
group_by(dayofweek,year,month) %>%
summarize(step_count=median(value))
plot <- ggplot(step_count,aes(x=month, y=step_count, group=dayofweek)) +
geom_line(aes(colour=dayofweek),size=1.5)+
theme_minimal()+
ggtitle("Weekly median stepcount")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment