Municipios with missing persons anomalies

on Mar 26, 2015

The Secretaría de Gobernación just updated the missing persons database (RNPED) to include data up to January 2015. The database now contains information on 25,293 missing persons from the fuero común (local government) and 443 from the fuero federal (federal government).

The most partisan first names

on Feb 9, 2015
I downloaded data from the Instituto Nacional Electoral to find out which names are the most overrepresented among the three main political parties in Mexico (PRI, PAN, and PRD). As was to be expected names are markers of class, income, religion, and geographical regions there are some major differences in which names the members of each political party bear.

The 74 most violent cities in Mexico

on Jan 14, 2015
I’ve updated the mxmortalitydb package to include 2013 data. This data only package includes all injury intent deaths (accidents, homicides, suicides, and unspcified intent) that were registered in Mexico from 2004 to 2013. You can use the package to calculate changes and trends in homicide rates in the most violent metro areas (or large municipios) or at the national level.

Nobody lives here

on Dec 10, 2014
This is an interactive map of all rural AGEBs that contain no localities and thus are empty of permanent residents. If you compare it to the US version, the total area with no people living inside it is much smaller since the data in Mexico is only available at the AGEB level (kind of like Census Tracts), whereas the data in the US is available at the Census Block level which are much smaller. Since there are no polygons available for rural localities, only points, I counted all rural AGEBs that contained a locality as being inhabited. - Crime information for the Distrito Federal

on Nov 10, 2014
Crime information for the Federal District now has its own website with updated data - English version - 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:

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.

Sectors (Each sector contains many quadrants)

P.S. The code and data are on GitHub