HoyodeCrimen.com - Crime information for the Distrito Federal

on Nov 10, 2014
Crime information for the Federal District now has its own website with updated data

https://hoyodecrimen.com/en/ - English version
https://hoyodecrimen.com/ - Spanish version

I've also added a trends section where you can look up which cuadrantes experienced a rise in crime
There seems to a be big problem with car robberies near where the new airport will be built


Since the crime data comes from FOIA requests to the SSPDF (Mexico City Police), I've added free email announcements to keep you informed of when new data is available:

Notifications in English
Notifications in Spanish


There's even an API with lots of cools stuff:

Important notice regarding crimenmexico

on Sep 25, 2014
The website where crimenmexico downloads crime information hasn't been responding for quite a while now, the SESNSP server's uptime has never been good but it has never stayed down for so long
which I guess means that Secretariado Ejecutivo del Sistema Nacional de Seguridad Pública has suspended its open data policy of providing crime information. Apparently crime info is now only downloadable from a couple of zip files, but SESNSP made sure to:
  • Change the names of the crimes to include whitespace at the end (e.g "ROBOS" to "ROBOS          ")
  • Not include the INEGI code for each state and municipality, thus making it really difficult to merge with other data
  • Spell state names both with and without accents (YUCATÁN and YUCATAN)
  • Include subtotals (e.g. total crimes with violence) at the municipality level but not at the state level
  • Change the file format from csv to xlsx (Excel)
It's almost as if they didn't want anyone analyzing the data. It used to be that crimenmexico processed all the information in an automatic manner and made new data available immediately, but with these changes that has become impossible (I'm betting next month there will be more changes). There will now be a delay of a few weeks or so while I figure how to process the data.

At the webpage for downloading the crime information the SESNSP claims that [emphasis added]:
La presentación de los datos sobre incidencia delictiva en este portal electrónico obedece a los principios de acceso a la información y transparencia y a la adopción de las mejores prácticas internacionales en gobierno abierto.
If you disagree you can contact the SESNSP at: cni@secretariadoejecutivo.gob.mx

Crime in Mexico City at the cuadrante delictivo level

on May 27, 2014
Click on the image to visit the interactive visualization
I recently made a FOIA request to the SSPDF requesting information on crime at the cuadrante delictivo level (in-between size a municipio and a manzana), and to my surprise they actually answered with a PDF file containing homicides, robbery to businesses with violence, and car robbery with and without violence, from Jan 2013 to April 2014. I also asked for data on extortion, kidnapping, etc but the SSPDF claimed not to have any records on those crimes.

To be able to display the data on a map I scraped the polygon coordinates of each cuadrante from the find the cop assigned to your quadrant website. The data was supplemented with population figures obtained by using a point-in-polygon algorithm from the 2010 Census at the manzana level.

The data for April 2014 was clearly incomplete and I excluded it from the visualizations. The numbers provided by the SSPDF compare favorably to those provided by the SNSP, though you have to remember these are averiguaciones previas (reports) and that they undercount the number of victims, especially for the crime of homicide.

## 2013 - SNSP Homicidio doloso == 749 vs SSPDF == 899
## 2013 - SNSP Robo a negocio C/V == 4,239 vs SSPDF == 4290
## 2013 - SNSP Robo de vehiculo automotor C/V == 5223 vs SSPDF == 5211
## 2013 - SNSP Robo de vehiculo automotor S/V == 12,056 vs SSPDF == 12014

The data at the cuadrante level is visualized as counts because the daytime population of a cuadrante is probably different from the number of people who actually live there.

Quadrants
Sectors (Each sector contains many quadrants)
Website

P.S. The code and data are on GitHub

Analysis of the UNAM's entrance exam

on Apr 7, 2014
The UNAM is Mexico's biggest and most important university. To enter it students must either take an exam or graduate from a high school run by the UNAM in less than 4 years with a grade point average of at least 70% (although some majors like medicine require 90% for pase directo). The admission exam is given twice a year, in February and June, and any student from any high school with at least a grade point average of 70% can take it. If the student meets the requirements for entering the UNAM, passing the exam guarantees him admission. The exam has 120 questions.

Interactive map of the drug war in Mexico - 2012

on Jan 7, 2014

It's that time of the year again when I update the interactive map of the drug war in Mexico. The map now uses 30 day months to calculate homicide rates and the new CONAPO population estimates. As usual there is also a Spanish version. All deaths registered without a date of occurrence were assumed to have occurred in the same month they were registered and all deaths without a municipio of occurrence were assumed to have taken place where they were registered. Various events are worth checking out:

Changes in homicide rates

on Dec 18, 2013
More examples of using the mxmortalitydb package! Changes and trends in homicide rates in the most violent metro areas or big municipios. There was a big increase in violence in Nuevo Laredo. For comparison the homicide rate in Chicago (metro area) was 8.2.


An R package with all injury intent deaths registered in Mexico 2004-2012

on Dec 17, 2013
This is a data only package containing all injury intent deaths (accidents, suicides, homicides, legal interventions, and deaths of unspecified intent) registered by the SSA/INEGI from 2004 to 2012. The data source for the database is the INEGI. In addition the data was coded with the Injury Mortality Matrix provided by the CDC.

The package is only available from github, to install:

devtools::install_github("diegovalle/mxmortalitydb")

be sure to visit its github page to find out more!