Last active
May 3, 2019 07:41
-
-
Save akshat3096/77c064d94147fe7194d21a1a903be1fa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
steps <- df %>% | |
filter(type == 'HKQuantityTypeIdentifierStepCount') %>% | |
group_by(date,year,month) %>% | |
summarize(steps=sum(value)) | |
steps$date <- as.Date(steps$date,"%Y-%m-%d") | |
plot2 <- ggplot(steps,aes(x=date, y=steps, group=year)) + | |
geom_line(aes(colour=year))+ | |
geom_snooth(se=F)+ | |
ggtitle("Total Steps Everyday")+ | |
xlab("Month/Year") | |
plot2+ | |
scale_x_date(date_labels = "%b/%Y") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment