Last active
August 29, 2015 14:17
-
-
Save jhwhite/b305b205b31f8c6a5f9c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| library("ggplot2") | |
| library("dplyr") | |
| library("lubridate") | |
| library("grid") | |
| s3_files <- read.csv(file="s3.csv", head=FALSE) | |
| colnames(s3_files) <- c("date", "time", "size", "filename") | |
| s3_files$time <- hms(s3_files$time) | |
| s3_files$hour <- factor(hour(s3_files$time)) | |
| break.down.hour.date <- s3_files %>% | |
| select(-time) %>% # dplyr doesn't like this column for some reason | |
| group_by(date, hour) %>% | |
| summarise(size=sum(size)) | |
| hour.date.graph <- ggplot(break.down.hour.date, aes(x=break.down.hour.date$hour, y=break.down.hour.date$date, size=size, color=size)) | |
| hour.date.graph + geom_point() + | |
| ggtitle("Hourly breakdown of files from Jan 05 - Mar 04") + | |
| xlab("Hour of day") + | |
| ylab("Date") + | |
| guides(size=FALSE) + | |
| scale_size(range=c(5, 15)) + | |
| guides(color=FALSE) + | |
| theme(axis.title=element_text(size=16), | |
| plot.title=element_text(size=18, face="bold"), | |
| panel.grid.major = element_line(colour="grey"), | |
| panel.grid.minor = element_line(colour="grey"), | |
| plot.background = element_rect(fill="grey90"), | |
| plot.margin = unit(c(4, 4, 10, 4), "mm"), | |
| panel.background = element_rect(fill="grey90")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment