How safe is Mexico? That is a frequent question people ask me. There is even website about it (see this blog post). So I’ve decided it was time to go one step further and make an interactive map (click here for full screen) of poverty and crime in Mexico.
The objective was to see which municipalities have higher crime rates and visually check if municipalities with higher crime rates also have high poverty rates. While unfortunately, the most recent poverty data at the municipality level is for 2010 while the crime data, at the same level, is only available for 2011, 2012, 2013, I was still able to glean some interesting insights.
The interactive map´s main take away is that high rates of selected crimes are concentrated in just a few municipalities. Moreover, there appears to be no direct link to high poverty rates.
To do the analysis I used R and QGIS, all that code is freely available in my github account. If you are interested in learning more about how I made the map, keep reading!
I wanted to use data from crimes published by SEGOB. Nevertheless, the website is frequently unavailable, so I had to use the data published by Diego Valle-Jones. This data has selected crimes for “fuero comun” (ordinary crimes such as robbery or assault, and those of federal jurisdiction such as drug trafficking) for the period 2011, 2011 and 2013 per municipality. In total there were 1,157,425 for the period 2011-2013. The diagram below shows the selected crime types (Spanish only, sorry!).
There is much analysis that can be done with the data, and indeed keep your eyes out for some coming in a blog post soon! Meanwhile, however, please feel free to run your own analysis and let me know if you find something cool. Happy coding…