Skip to content

Instantly share code, notes, and snippets.

Diego Valle-Jones diegovalle

Block or report user

Report or block diegovalle

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@diegovalle
diegovalle / ageb0.json
Last active Aug 29, 2015
Nobody lives here
View ageb0.json
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@diegovalle
diegovalle / mx_hexgrid.json
Created May 15, 2015
Hex Grid of Mexican States
View mx_hexgrid.json
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View election2015.R
library(ggplot2)
library(dplyr)
library(readr)
library(rgeos)
library(maptools)
library(rgdal)
library(scales)
library(downloader)
#Download the latest version of the PREP
@diegovalle
diegovalle / first-nation-homicides.R
Created Jun 19, 2015
Aboriginal (Canada) and American Indian or Alaska Native (U.S.A.) homicide rates
View first-nation-homicides.R
library("ggplot2")
library("gridExtra")
addSource <- function(plot, text = "") {
plot <- arrangeGrob(plot,
sub = textGrob(text,
x = 0, hjust = -0.1, vjust=0.1,
gp = gpar(fontface = "italic", fontsize = 9,
col = "gray30")))
return(plot)
@diegovalle
diegovalle / cheaters.r
Last active Sep 4, 2015
Corruption indicators and their correlations
View cheaters.r
########################################################
##### 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()
@diegovalle
diegovalle / gdp.r
Created Feb 25, 2010
Pretty plots of Mexico's gdp
View gdp.r
########################################################
##### 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
@diegovalle
diegovalle / juarez-vs-chihuahua.r
Created Jun 21, 2010
Compare the SNSP homicide data for Chihuahua
View juarez-vs-chihuahua.r
########################################################
##### 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
@diegovalle
diegovalle / hispanics-vs-mexicans.r
Created Jul 9, 2010
Homicide in Mexico, the US and Canada
View hispanics-vs-mexicans.r
########################################################
##### 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
@diegovalle
diegovalle / cisen.r
Created Aug 4, 2010
Plot CISEN execution data and compare it to that reported by Milenio
View cisen.r
#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)) +
@diegovalle
diegovalle / narco-killings.R
Created Oct 14, 2010
Narco killings map of Mexico
View narco-killings.R
#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)
You can’t perform that action at this time.