source("config/style.R")
d <- read.csv("data/measurements.csv",stringsAsFactors=FALSE)
totals <- aggregate(records~day,data=d,FUN=sum)
a <- ggplot(totals,aes(day,records)) + geom_col(fill="#00549F") +
  labs(title="Intake",y="Records")
b <- ggplot(d,aes(day,temperature,colour=station,group=station)) +
  geom_line() + labs(title="Conditions",y="Temperature (C)")
plots <- matrix(list(ggplotGrob(a),ggplotGrob(b)),nrow=1)
p <- gtable::gtable_matrix("archive",plots,widths=grid::unit(c(1,1),"null"),
                           heights=grid::unit(1,"null"))
export_plot(p, "GGP-16-006")
