Skip to content

Instantly share code, notes, and snippets.

@simecek
Created January 10, 2012 09:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save simecek/1587973 to your computer and use it in GitHub Desktop.
Save simecek/1587973 to your computer and use it in GitHub Desktop.
Make the plot of data mined by Google Apps Script
data <- read.csv("http://docs.google.com/spreadsheet/pub?hl=en_US&hl=en_US&key=0AnhE_6FIbbVWdFNxeS1ESWtvSUk5WE5KcnBwVWVqckE&output=csv", header=FALSE, skip=1, as.is=TRUE)
sent <- data.frame(Time=strptime(data[,1], "%H:%M:%S"))
library(ggplot2)
theme_update(panel.background = theme_rect(fill = "grey90", colour = "black"))
xstart <- strptime("01:00:00", "%H:%M:%S")
xend <- strptime("23:00:00", "%H:%M:%S")
ggplot(sent, aes(Time)) + geom_density(fill="grey50", adjust=0.5) + xlim(xstart, xend)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment