public
Last active

Chart of the number of homicides in Chihuahua

  • Download Gist
2009-update.R
R
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
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)
 
 
ggplot(hom, aes(factor(year), updates, group = 1)) +
scale_colour_discrete("Source") +
geom_line(aes(color = "SNSP")) +
geom_line(aes(factor(year), original, color = "SNSP"),
linetype = 2) +
geom_point(aes(factor(year), inegi, color = "INEGI")) +
ylim(0, max(update)) +
xlab("year") +
ylab("number of homicides") +
opts(title = "Discrepancies in Homicide Data for the State of Chihuahua") +
annotate("text", x = "2009", y = 2523, label = "original SNSP",
hjust = 0) +
annotate("text", x = "2009", y = 3156, label = "updated SNSP",
hjust = 0) +
annotate("text", x = "2008", y = 2567, label = "INEGI",
hjust = 1.06)

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.