Poverty and Crime in Mexico – Interactive Map

March 6, 2014
By

(This article was first published on Jose Gonzalez » R, and kindly contributed to R-bloggers)

Poverty and crime in Mexico

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!

For the poverty map, I used data from CONEVAL and GADM to put together a map similar to the one in my previous blog post.

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!).

Selected crimes

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…

The post Poverty and Crime in Mexico – Interactive Map appeared first on Jose Gonzalez.

To leave a comment for the author, please follow the link and comment on his blog: Jose Gonzalez » R.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.