Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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(readr) | |
library(rgeos) | |
library(maptools) | |
library(rgdal) | |
library(scales) | |
library(downloader) | |
#Download the latest version of the PREP |
This file contains 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
######################################################## | |
##### Author: Diego Valle Jones | |
##### Website: www.diegovalle.net | |
##### Date Created: Thu Feb 18 19:34:27 2010 | |
######################################################## | |
#Corruption indicators and their correlations | |
library(ggplot2) | |
grid.newpage() |
This file contains 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
######################################################## | |
##### Author: Diego Valle Jones | |
##### Website: www.diegovalle.net | |
##### Date Created: Mon Feb 22 19:11:54 2010 | |
######################################################## | |
#Pretty plots of Mexico's gdp | |
library(ggplot2) | |
#deseasonalized quarterly gdp 1993-2009 in 2003 pesos |
This file contains 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
######################################################## | |
##### Author: Diego Valle Jones | |
##### Website: www.diegovalle.net | |
##### Date Created: Sun Jun 20 20:30:49 2010 | |
######################################################## | |
#Compare the SNSP homicide data for Chihuahua | |
library(ggplot2) | |
#Chihuahua 2008: 1,414 - SNSP data http://www.icesi.org.mx/documentos/estadisticas/estadisticas/denuncias_homicidio_doloso_1997_2008.xls | |
#Cd. Juarez 2008: 1653 - http://www.google.com/hostednews/afp/article/ALeqM5g2iONUbtwl8in-a_sCMRSmoX8veA |
This file contains 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
######################################################## | |
##### Author: Diego Valle Jones | |
##### Website: www.diegovalle.net | |
##### Date Created: Tue Jul 13 11:02:59 2010 | |
######################################################## | |
#1. -Compare homicide rates according Vital Statistics in the US (Hispanics) and in Mexico | |
#2.- Homicides in the three North American coutries | |
#Sources: | |
#INEGI Estadísticas Vitales for Mexico - http://github.com/diegovalle/Homicide-MX-Drug-War |
This file contains 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
#Plot CISEN execution data and compare it to that reported by Milenio | |
library(ggplot2) | |
execu <- read.csv("http://spreadsheets.google.com/pub?key=0AjjLwVYbDGx7dGl3VVRza3JJT3pLQlBqZVNVUGh6SHc&hl=en&single=true&gid=0&output=csv") | |
mexecu <- melt(execu[3:6], id = c("Year","Month")) | |
mexecu$date <- as.Date(paste(mexecu$Year, mexecu$Month, "15", | |
sep = "-"), | |
format = "%Y-%b-%d") | |
ggplot(mexecu, aes(date, value, group = variable, color = variable)) + |
This file contains 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
#Download the narco killings map compiled by Walter Mckay available | |
#at LEAP Mexico https://sites.google.com/site/policereform/leap-mexico/narco-killings | |
library(rgdal) | |
library(gtools) | |
library(maptools) | |
library(ggplot2) | |
library(maps) | |
library(Cairo) | |
library(stringr) | |
library(MASS) |
This file contains 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) | |
update <- c(2030, 3156) | |
original <- c(1414, 2523) | |
inegi <- c(2567, NA) | |
hom <- data.frame(year = 2008:2009, | |
updates = update, | |
original = original, | |
inegi = inegi) |