Reproducible Research Repository
Reproducible Research Repository
  • Home
  • Repository
  • Collections
  • About
    Home / Repository / PRWP / RR_MEX_2026_661
PRWP

Reproducibility package for Trade Diversion And Jobs: Evidence From Mexican Municipalities

2026
Get Reproducibility Package
Reference ID
RR_MEX_2026_661
Author(s)
Carlos Rodríguez-Castelán, Emmanuel Vazquez, Hernan Winkler
Collections
World Bank Policy Research Working Papers
Metadata
JSON
Created on
Jun 24, 2026
Last modified
Jun 24, 2026
Page views
19
Downloads
1
  • Project Description
  • Downloads
  • Overview
  • Reproducibility Package
  • Description
  • Scope and coverage
  • Disclaimer
  • Access and rights
  • Contacts
  • Information on metadata
  • Overview

    Abstract

    This article examines the local effects of the 2018-2019 U.S.-China trade disruptions on Mexico. Combining detailed municipal-level customs data with U.S. tariff schedules, we estimate that municipalities with greater export concentration in products targeted by U.S. tariffs on China (hereafter, tariff exposure) experienced significantly larger nearshoring dividends. A 1 percent increase in tariff exposure led to a 4.3 percent increase in municipality-level exports to the United States, with gains concentrated in northern and south-central states. These export gains translated into broad labor market improvements: total labor income rose by 5.6 percent for each 1 percent increase in tariff exposure, driven by job creation rather than wage growth as average earnings remained unchanged. Effects were heterogeneous across skill levels, with the largest employment rate gains among semi-skilled workers. Beyond job quantity, the shock improved job quality: each 1 percent increase in tariff exposure reduced labor informality by 0.25 percentage points, with newly created jobs disproportionately being formal. Effects were driven primarily by manufacturing but extended to services through local spillovers. The findings indicate that trade policy changes between major economies can significantly reshape the spatial distribution of economic activity and quantity and quality of jobs in third-party countries.

    Reproducibility Package

    Scripts
    Readme Get Reproducibility Package
    Link: https://reproducibility.worldbank.org/catalog/585/download/1741/README.pdf
    Reproducibility package for Trade Diversion And Jobs: Evidence From Mexican Municipalities
    File name
    RR_MEX_2026_661
    Zip package
    RR_MEX_2026_661.zip
    Title
    Reproducibility package for Trade Diversion And Jobs: Evidence From Mexican Municipalities
    Date
    2026-06
    Dependencies
    Stata dependencies are listed in the ado folder.
    Instructions
    See README in reproducibility package.
    Notes
    Computational reproducibility verified by Development Impact (DECDI) Analytics team, World Bank.
    Source code repository
    Repository name URI
    Reproducible Research Repository (World Bank) https://reproducibility.worldbank.org
    Software
    Stata
    Name
    Stata
    Version
    19.5 MP

    Reproducibility

    Technology environment

    Paper exhibits were reproduced on a computer with the following specifications:
    • OS: Windows 11 Enterprise
    • Processor: Intel(R) Xeon(R) Gold 6226R CPU @ 2.90GHz
    • Memory available: 32.0 GB

    Technology requirements

    Runtime: ~10 minutes.

    Reproduction instructions

    To reproduce the findings in this paper, a replicator must:

    1. Secure Access to Data: Access the datasets not included in the package. See the Datasets section for more details.
    2. Run the Package:
    • Update the working directory of the do-file 0_master.do, and run it.

    Since not all the original data can be redistributed, the package includes the outputs produced by the authors, which can be used to review the results presented in the paper.

    Data

    Datasets
    US-China Trade War Tariff Database
    Name
    US-China Trade War Tariff Database
    Note
    Source: Replication package of Fajgelbaum, P., P. Goldberg, P. Kennedy, A. Khandelwal, and D. Taglioni (2024). Access date: June 3, 2024. File location: "Data\fajgelbaum". File names: m_flow_hs10_fm.dta.
    Access policy
    Data is publicly available and included in the reproducibility package.
    License
    Custom license
    License URL
    https://www.aeaweb.org/journals/data/data-code-policy
    Data URL
    https://www.dropbox.com/scl/fi/lgey47dqk0rouv06e1990/TWGR_replication.zip?rlkey=a1g4wulrveq3m6n9pa0aqtmxj&e=1&dl=0
    Citation
    Fajgelbaum, P., Goldberg, P., Kennedy, P., Khandelwal, A., and Taglioni, D. (2024). "The US-China Trade War and Global Reallocations" [replication package]. American Economic Review: Insights 6(2): 295–312. https://www.dropbox.com/scl/fi/lgey47dqk0rouv06e1990/TWGR_replication.zip?rlkey=a1g4wulrveq3m6n9pa0aqtmxj&e=1&dl=0. Accessed June 2024.
    Mexico Foreign Trade by Municipality
    Name
    Mexico Foreign Trade by Municipality
    Note
    Source: Secretariat of Economy, Government of Mexico. Access dates: May 17, 2024 (exports to US by product; total exports by product); June 13, 2024 (total exports by municipality); November 29, 2024 (imports from China). File location: "Data\datamexico". File names: Exports to US by product and municipality from 2006 to 2024.csv; Total Exports by product and municipality from 2006 to 2024.csv; Total Exports by municipality from 2006 to 2024.csv; Imports from CH by product and municipality from 2006 to 2024.csv.
    Access policy
    Data is publicly available and included in the reproducibility package.
    License
    Custom license
    License URL
    https://www.economia.gob.mx/datamexico/en/about/legal
    Data URL
    https://www.economia.gob.mx/datamexico/en/vizbuilder
    Citation
    Secretariat of Economy. (2024). "Foreign Trade by Municipality — INEGI-Balanza Comercial de Mercancías de México (BCMM)" [dataset]. Data Mexico Viz Builder. https://www.economia.gob.mx/datamexico/en/vizbuilder. Accessed May–November 2024.
    Municipality-Level Socioeconomic Variables
    Name
    Municipality-Level Socioeconomic Variables
    Note
    Source: Authors' extract from the database used in Rodríguez-Castelán, C., Vazquez, E., and Winkler, H. (2024). Extract shared by the authors on March 2, 2025. Contains: municipality identifier, year, total population, rural population share, literacy among the population aged 15 or older, and log median per capita income (in real 2014 Mexican pesos). Population and literacy variables constructed from Mexican population censuses and population counts. Income measure generated using the poverty mapping methodology of Elbers, Lanjouw, and Lanjouw (2003) as implemented in Enamorado et al. (2016); deflated using the average National Consumer Price Index from INEGI (December 2010 base). File location: "Data\castelan et al - 2024". File names: castelan_vazquez_winkler_2024.dta.
    Access policy
    Data is publicly available and included in the reproducibility package.
    Citation
    Rodríguez-Castelán, C., Vazquez, E., and Winkler, H. (2024). "Exports and Income Inequality in Mexico" [dataset extract]. Journal of Development Studies 60(7): 1131–1159. DOI: 10.1080/00220388.2024.2337373. Shared by authors, March 2025.
    IPUMS International — Mexico Population Censuses
    Name
    IPUMS International — Mexico Population Censuses
    Note
    Source: IPUMS (Integrated Public Use Microdata Series) International, University of Minnesota. Access date: January 7, 2025. File location: "Data\ipums". File names: ipums_original.dta.
    Access policy
    Data is publicly available but does not allow redistribution and is not included in the reproducibility package.
    License
    Custom license
    License URL
    https://international.ipums.org/international/terms.shtml
    Data URL
    https://international.ipums.org/international-action/variables/group
    Citation
    Steven Ruggles, Lara Cleveland, Rodrigo Lovaton, Sula Sarkar, Matthew Sobek, Derek Burk, Dan Ehrlich, Jane Lee, and Nate Merrill. Integrated Public Use Microdata Series, International: Version 7.5 [dataset]. Minneapolis, MN: IPUMS, 2024.
    Daily COVID-19 Cases and Deaths by Municipality
    Name
    Daily COVID-19 Cases and Deaths by Municipality
    Note
    Source: General Directorate of Epidemiology, Secretariat of Health, Government of Mexico. Access date: September 27, 2024. File location: "Data\covid". File names: Casos_Diarios_Municipio_Confirmados_20230625.csv; Casos_Diarios_Municipio_Defunciones_20230625.csv.
    Access policy
    Data is publicly available and included in the reproducibility package.
    License
    Custom license
    Data URL
    https://datos.covid-19.conacyt.mx/#DownZCSV
    Citation
    General Directorate of Epidemiology, Secretariat of Health, Government of Mexico. (2023). "Casos Diarios por Municipio — COVID-19" [dataset]. https://datos.covid-19.conacyt.mx/#DownZCSV. Accessed September 2024.
    Economic Censuses
    Name
    Economic Censuses
    Note
    Source: INEGI Instituto Nacional de Estadística y Geografía — Mexico's National Institute of Statistics and Geography. Census years included: 2003, 2008, 2013, 2018, and 2023. Access date: August 28, 2025. File location: "Data\censos economicos". File names: SAIC_Exporta_2025828_114239722.csv.
    Access policy
    Data is publicly available and included in the reproducibility package.
    License
    Custom license
    License URL
    https://www.inegi.org.mx/inegi/terminos.html
    Data URL
    https://www.inegi.org.mx/app/saic/default.html
    Citation
    INEGI Instituto Nacional de Estadística y Geografía. (2025). "Sistema Automatizado de Información Censal (SAIC) — Censos Económicos 2003, 2008, 2013, 2018, 2023" [dataset]. https://www.inegi.org.mx/app/saic/default.html. Accessed August 2025.
    Municipal Geographic Boundaries
    Name
    Municipal Geographic Boundaries
    Note
    Source: INEGI Instituto Nacional de Estadística y Geografía — Mexico's National Institute of Statistics and Geography. Version of September 2019. File location: "Data\shapes". File names: areas_geoestadisticas_municipales.* (shapefile components); coords.dta; data.dta.
    Access policy
    Data is publicly available and included in the reproducibility package.
    License
    Custom license
    License URL
    https://www.inegi.org.mx/inegi/terminos.html
    Data URL
    https://www.inegi.org.mx/temas/mg/
    Citation
    INEGI Instituto Nacional de Estadística y Geografía. (2019). "Marco Geoestadístico — Áreas Geoestadísticas Municipales" [dataset]. September 2019. https://www.inegi.org.mx/temas/mg/. Accessed March 2019.
    Data statement

    All data sources are publicly available but not all are included in the reproducibility package.

    Description

    Output
    Trade Diversion And Jobs: Evidence From Mexican Municipalities
    Type
    Working Paper
    Title
    Trade Diversion And Jobs: Evidence From Mexican Municipalities
    Description
    Policy Research Working Papers (PRWP)
    Authors
    Author Affiliation Email
    Carlos Rodríguez-Castelán World Bank crodriguezc@worldbank.org
    Emmanuel Vazquez CEDLAS-UNLP evazquez@cedlas.org
    Hernan Winkler World Bank hwinkler@worldbank.org
    Date of production

    2026-06-16

    Scope and coverage

    Geographic locations
    Location Code
    Mexico MEX
    Keywords
    International Trade Labor Markets Trade Policy
    Topics
    ID Topic Parent topic ID Vocabulary Vocabulary URI
    F13 Trade Policy • International Trade Organizations F1 Journal of Economic Literature (JEL)
    F14 Empirical Studies of Trade F1 Journal of Economic Literature (JEL)
    F16 Trade and Labor Market Interactions F1 Journal of Economic Literature (JEL)
    L60 General L6 Journal of Economic Literature (JEL)
    O19 International Linkages to Development • Role of International Organizations O1 Journal of Economic Literature (JEL)
    R12 Size and Spatial Distributions of Regional Economic Activity R1 Journal of Economic Literature (JEL)
    R23 Regional Migration • Regional Labor Markets • Population • Neighborhood Characteristics R2 Journal of Economic Literature (JEL)

    Disclaimer

    Disclaimer

    The materials in the reproducibility packages are distributed as they were prepared by the staff of the International Bank for Reconstruction and Development/The World Bank. The findings, interpretations, and conclusions expressed in this event do not necessarily reflect the views of the World Bank, the Executive Directors of the World Bank, or the governments they represent. The World Bank does not guarantee the accuracy of the materials included in the reproducibility package.

    Access and rights

    License
    Name URI
    MIT License https://opensource.org/license/mit
    World Bank IGO Rider https://github.com/worldbank/metadata-editor/blob/main/WB-IGO-RIDER.md

    Contacts

    Contacts
    Name Affiliation Email
    Carlos Rodríguez-Castelán World Bank crodriguezc@worldbank.org
    Reproducibility WBG World Bank reproducibility@worldbank.org

    Information on metadata

    Producers
    Name Abbreviation Affiliation Role
    Reproducibility WBG DECDI World Bank - Development Impact Department Verification and preparation of metadata
    Date of Production

    2026-06-16

    Document version

    1

    Back to Catalog
    The World Bank Working for a World Free of Poverty
    • IBRD IDA IFC MIGA ICSID

    © The World Bank Group, All Rights Reserved.