MX2000A_RESMUN variable not appearing correctly

Dear IPUMS community,

I am looking at internal migration within Mexico and I have a data extract from the 2000 Mexican census with the source variable MX2000A_RESMUN.

I am using the ipumsr package to bring the data into R and the values I get do not match the codebook. I expect six digit codes (first three digits are state and second three digits are the municipality). According to the documentation, MX2000A_RESMUN is coded just like the GEO2_MX2000 variable: IPUMS-I: descr: GEO2_MX2000

The attached screenshot shows the R output in three steps: importing the extract, filtering on that variable, and tabulating on it.

I’d appreciate any insight as to what’s happening here.



Hi Stephen,

Your R code looks correct, but unfortunately the codes for household geography and the municipality of residence 5 years ago have not yet been matched for Mexico. IPUMS is in the process of reconciling household and migration geography and this is a work in progress. Some countries have already been completed, but others such as Mexico will require greater work in matching the codes between MX2000A_RESMUN and GEO2_MX2000. I understand this is probably not the answer you were hoping for, but I hope it’s still useful to know.


Thanks for the reply. I may be willing to do the matching myself depending on how involved it is.

Is there a code book available from the Inegi (the Mexican office of Geography and Statistics) for MX2000A_RESMUN?


The GEO2_MX translation table provided at the bottom of the page has the source codes for the municipalities. These need to be matched with codes from MX2000A_RESMUN. Sometimes there are mismatches between the migration codes and the household geography codes. However, since IPUMS International hasn’t begun the harmonization process for Mexico, they are unfortunately unable to help if there are any mismatches. Since the municipality codes from MX2000A_RESMUN are state-specific, once they are matched they need to be combined with MIG1_5_MX from the 2000 census to find the specific municipality.

Hope that helps put you on the right track!