Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
energy <- df %>%
filter(type == 'HKQuantityTypeIdentifierActiveEnergyBurned') %>%
group_by(date,year,month) %>%
summarize(energy_burned=sum(value))
energy$date <- as.Date(energy$date,"%Y-%m-%d")
plot3 <- ggplot(energy,aes(x=date, y=energy_burned, group=year)) +
geom_line(aes(colour=year))+
ggtitle("Total Energy burned")
plot3+
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
You can’t perform that action at this time.