Created
September 13, 2013 00:08
-
-
Save calderonsteven/6545424 to your computer and use it in GitHub Desktop.
grafica los datos curados de http://datosabiertoscolombia.cloudapp.net/frm/catalogo/frmCatalogo.aspx?dsId=55
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
| rm(list=ls()) | |
| path_to_dir <- "~/Dropbox/code/rnad-chiboha" # reset this | |
| setwd(path_to_dir) | |
| # libraries | |
| # install this like so: | |
| install.packages('plyr') | |
| install.packages('makeR') | |
| library('plyr') | |
| library('makeR') | |
| # read in data | |
| #df <- read.csv("raw_data.csv", header=F, sep="\t") | |
| # clean up | |
| #df$V2 <- NULL | |
| #df$V3 <- NULL | |
| #df$V4 <- NULL | |
| #names(df) <- c("id", "date", "dept_id", "dept_nombre", "municipio_id", "municipio_nombre", "area", "acc_desc", "type", "time", "obs") | |
| # write clean data | |
| df = read.csv(df, "clean_data.csv", row.names=FALSE) | |
| # plot some things! | |
| # calendar | |
| day_count <- ddply(df, c('date'), function(x) { | |
| return(data.frame(count=nrow(x))) | |
| }) | |
| calendarHeat(day_count$date, day_count$count) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment