Visualizing Unemployment in Mexico

December 22, 2009

(This article was first published on Diego Valle's Blog, and kindly contributed to R-bloggers)

What has been the impact of the economic crisis on employment? And how has it affected the different regions of Mexico?

To answer the questions the first step was to obtain the unemployment data from the Banco de Información Económica at the INEGI. The data is available only at the state level, and not at the county level. Here’s a chart with the unemployment rate for all of Mexico:
Unemployment Rate
The second step was to download a map Mexico from the ICESI. The INEGI has a bunch of maps with much higher resolution, but the one from the ICESI had the smallest memory footprint of any map I could find, and since we are not going to print out the map, it is the one I used.

While preparing the data I noticed that the map had a state called “Baja California Norte,” in real life no such state exists. When merging the unemployment data with the map from the ICESI it was easier to just add a column with the values from the map, so yes, I’m aware of the mistake, don’t blame me if you decide to use it to label states.
Unemployment in Mexico, by state
Lots of unemployment in the Northern and Central Mexico, no surprise there, since it is tightly integrated with the US economy. Coahuila and Chihuahua have the highest rates at 9.72%. The south, being less developed and less reliant on exports to the US, has a lower unemployment rate. Oaxaca has the lowest rate with 1.74%. Notice the darkening of Quintana Roo (where Cancun is) in 2009 because of the swine flu

If the Mexican economy contracted 6.4% on a yearly basis in the third trimester of 2009, why is unemployment so low compared to other nations? Is the Mexican government fooling around with the definition of unemployment? Maybe, but it mostly follows the definition of unemployment of the oecd. There was change in the definition of the economically active population to exclude people younger than 14 (it was formerly 12), but that only lowers the rate by about .01%. A more likely explanation is given by the INEGI [pdf]: 1)There is no social safety net or unemployment insurance in Mexico so people are more willing to take crappy jobs. 2) The unemployed workers emigrate to the US.

The source code to generate the charts is available from Github

To leave a comment for the author, please follow the link and comment on their blog: Diego Valle's Blog. offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, 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...

Tags: , ,

Comments are closed.


Mango solutions

RStudio homepage

Zero Inflated Models and Generalized Linear Mixed Models with R

Quantide: statistical consulting and training


CRC R books series

Contact us if you wish to help support R-bloggers, and place your banner here.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)