Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save narath/c256b212fcee1cc957760898e84be381 to your computer and use it in GitHub Desktop.
Save narath/c256b212fcee1cc957760898e84be381 to your computer and use it in GitHub Desktop.
# It is better to use date_trunc which is supported in Postgresql
volume.experiences %>%
mutate(monthyear = date_trunc("month",date_of_experience)) %>%
group_by(monthyear) %>%
summarize(count=sum(count)) %>%
ggplot(aes(x=monthyear, y = as.integer(count))) +
geom_area(fill="lightblue", color="black") +
labs(x = "Date", y = "# of experiences")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment