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

Reproducibility package for South Africa's Fragmented Cities: The Unequal Burden Of Labor Market Frictions

2025
Get Reproducibility Package
Reference ID
RR_ZAF_2025_490
Author(s)
Javier E. Baez, Varun Kshirsagar
Collections
World Bank Policy Research Working Papers
Metadata
JSON
Created on
Dec 19, 2025
Last modified
Jan 07, 2026
  • Project Description
  • Downloads
  • Overview
  • Reproducibility Package
  • Description
  • Scope and coverage
  • Disclaimer
  • Access and rights
  • Contacts
  • Information on metadata
  • Overview

    Abstract

    Using high-resolution administrative, census, and satellite data, we show that South African cities are characterized by spatial mismatches between where people live and where jobs are located, relative to 20 global peers. Areas within 5 km of commercial centers have 9,300 fewer residents per square km than expected, 60% below the global median. Poor, dense neighborhoods are most affected. In Johannesburg, a 10-percentile increase in distance from business hubs corresponds to a 3.3-percentile drop in asset wealth (a proxy of household wellbeing) and 4.0 percentile drop in employment. In Cape Town, the declines are 2.6 and 2.3 percentiles, respectively. Employment is 87% lower in the poorest decile than the richest in Johannesburg, and 61% lower in Cape Town. These findings suggest that South Africa’s spatial organization of people and economic activity constrains agglomeration and reinforces inequality.

    Reproducibility Package

    Scripts
    Readme Get Reproducibility Package
    Link: https://reproducibility.worldbank.org/index.php/catalog/424/download/1207/README.pdf
    Reproducibility package for South Africa's Fragmented Cities: The Unequal Burden Of Labor Market Frictions
    File name
    RR_ZAF_2025_490
    Zip package
    RR_ZAF_2025_490.zip
    Title
    Reproducibility package for South Africa's Fragmented Cities: The Unequal Burden Of Labor Market Frictions
    Date
    2025-11
    Dependencies
    R dependencies are listed in the file renv.lock. 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
    R
    Name
    R
    Version
    4.5.1
    Stata
    Name
    Stata
    Version
    18 MP

    Reproducibility

    Technology environment

    Paper exhibits were reproduced on a computer with the following specifications:
    • OS: Windows 10 Enterprise, version 22H2
    • Processor: Intel(R) Xeon(R) Gold 6132 CPU @ 2.60GHz 2.60 GHz (2 processors)
    • Memory available: 128 GB

    Technology requirements

    Runtime: Approximately 3 hours

    Reproduction instructions

    To reproduce the findings in this study, please follow the steps below:

    1. Acquire the limited-access data and place all required files in the /Data folder. Please see the README file for detailed instructions on data access.
    2. Open the R project Reproducibility package.Rproj and run the following scripts in order:
      • Code/Master/run_all1.R
      • Stata_Master.do (run in Stata)
      • Code/Master/run_all2.R
    3. Outputs will be generated in the /Results and /Graphs folders.

    Data

    Datasets
    South Africa Census (2011)
    Name
    South Africa Census (2011)
    Note
    Source: Statistics South Africa (Stats SA)
    Access policy
    Data access requires human approval and is not included in the reproducibility package.
    Citation
    Statistics South Africa. 2011. South Africa Census 2011 [dataset]. Accessed in 2023. https://superweb.statssa.gov.za/webapi/jsf/login.xhtml
    South Africa Spatial Tax Data
    Name
    South Africa Spatial Tax Data
    Note
    Source: Explore Tax Data – Spatial Economic Activity Data, South Africa.
    Access policy
    Data access requires human approval and is not included in the reproducibility package.
    Data URL
    https://exploretaxdata.org/
    Citation
    Explore Tax Data. n.d. South Africa Spatial Tax Data, South Africa [dataset]. Accessed in 2024. https://exploretaxdata.org/
    Google Open Buildings data
    Name
    Google Open Buildings data
    Note
    Source: Google Research – Open Buildings Users must go to the URL below, open the download page, and follow the instructions under “Download all data” to access the data.
    Access policy
    Data is publicly available but not included in the reproducibility package due to file size constraints.
    License
    Creative Commons Attribution (CC BY-4.0) license
    License URL
    https://creativecommons.org/licenses/by/4.0/
    Data URL
    https://sites.research.google/gr/open-buildings/
    Citation
    Google Research. n.d. Open Buildings [dataset]. Accessed in 2025. https://sites.research.google/open-buildings/
    Origin–Destination Matrices data
    Name
    Origin–Destination Matrices data
    Note
    Source: Source: Open Source Routing Machine (OSRM)
    Access policy
    Data is publicly available but not included in the reproducibility package due to file size constraints.
    License
    Open Data Commons Open Database License
    License URL
    https://opendatacommons.org/licenses/odbl/
    Data URL
    http://project-osrm.org/
    Citation
    Open Source Routing Machine (OSRM). n.d. Origin–Destination Matrices [dataset]. Accessed in 2025. http://project-osrm.org/
    OpenStreetMap South Africa
    Name
    OpenStreetMap South Africa
    Note
    Source: OpenStreetMap Users must download the shapefiles from the URL below and place them in the correct folder, as described in the README.
    Access policy
    Data is publicly available but not included in the reproducibility package due to file size constraints.
    License
    Open Data Commons Open Database License (ODbL)
    License URL
    https://opendatacommons.org/licenses/odbl/
    Data URL
    https://download.geofabrik.de/africa/south-africa.html
    Citation
    OpenStreetMap contributors. n.d. OpenStreetMap data for South Africa [dataset]. Accessed in 2025. https://download.geofabrik.de/africa/south-africa.html
    Global Human Settlement Layer data
    Name
    Global Human Settlement Layer data
    Note
    Source: European Commission, Joint Research Centre (JRC) Users must download the shapefiles from the URL below and place them in the correct folder, as described in the README.
    Access policy
    Data is publicly available but not included in the reproducibility package due to file size constraints.
    License
    Creative Commons Attribution 4.0 International (CC BY 4.0) licence
    License URL
    https://commission.europa.eu/legal-notice_en#copyright-notice
    Data URL
    https://human-settlement.emergency.copernicus.eu/ghs_buV2023.php
    Citation
    Pesaresi M., Politis P. (2023): GHS-BUILT-V R2023A - GHS built-up volume grids derived from joint assessment of Sentinel2, Landsat, and global DEM data, multitemporal (1975-2030).European Commission, Joint Research Centre (JRC) PID: http://data.europa.eu/89h/ab2f107a-03cd-47a3-85e5-139d8ec63283, doi:10.2905/AB2F107A-03CD-47A3-85E5-139D8EC63283
    Population grid multitemporal (1975-2030) data
    Name
    Population grid multitemporal (1975-2030) data
    Note
    Source: European Commission, Joint Research Centre (JRC)
    Access policy
    Data is publicly available but not included in the reproducibility package due to file size constraints.
    License
    Creative Commons Attribution 4.0 International (CC BY 4.0) licence
    License URL
    https://commission.europa.eu/legal-notice_en#copyright-notice
    Data URL
    https://human-settlement.emergency.copernicus.eu/ghs_pop2023.php
    Citation
    Schiavina M., Freire S., Carioli A., MacManus K. (2023): GHS-POP R2023A - GHS population grid multitemporal (1975-2030).European Commission, Joint Research Centre (JRC) PID: http://data.europa.eu/89h/2ff68a52-5b5b-4a22-8f40-c41da8332cfe, doi:10.2905/2FF68A52-5B5B-4A22-8F40-C41DA8332CFE
    Night-Time Lights data
    Name
    Night-Time Lights data
    Note
    Source: Earth Observation Group
    Access policy
    Data is publicly available but not included in the reproducibility package due to file size constraints.
    License
    Creative Commons Attribution 4.0 International license
    License URL
    https://creativecommons.org/licenses/by/4.0/deed.en
    Data URL
    https://eogdata.mines.edu/products/vnl/
    Citation
    Elvidge, C. D., K. Baugh, M. Zhizhin, F. C. Hsu, and T. Ghosh. 2017. VIIRS night-time lights. International Journal of Remote Sensing 38: 5860–5879.
    Administrative Shape Files for South Africa
    Name
    Administrative Shape Files for South Africa
    Note
    Source: Global Administrative Areas (GADM)
    Access policy
    Data is publicly available but does not allow redistribution and it is not included in the reproducibility package.
    License
    Creative Commons Attribution-ShareAlike 2.0
    License URL
    https://gadm.org/license.html
    Data URL
    https://gadm.org/data.html
    Citation
    Global Administrative Areas (GADM). . "Administrative Shape Files for South Africa [dataset]," 4.1, https://gadm.org/data.html, 2025
    Data statement

    Some data sources are limited-access and are not included in the reproducibility package. For more details, please refer to the README file.

    Description

    Output
    South Africa's Fragmented Cities: The Unequal Burden Of Labor Market Frictions
    Type
    Working Paper
    Title
    South Africa's Fragmented Cities: The Unequal Burden Of Labor Market Frictions
    Description
    Policy Research Working Papers (PRWP)
    Authors
    Author Affiliation Email
    Javier E. Baez World Bank jbaez@worldbank.org
    Varun Kshirsagar World Bank vkshirsagar@worldbank.org
    Date of production

    2025-11-22

    Scope and coverage

    Geographic locations
    Location Code
    South Africa ZAF
    Keywords
    Poverty Spatial Inequality Local Labor Markets The Economics Of Cities
    Topics
    ID Topic Parent topic ID Vocabulary Vocabulary URI
    R14 Land Use Patterns R1 Journal of Economic Literature (JEL)
    R23 Regional Migration • Regional Labor Markets • Population • Neighborhood Characteristics R2 Journal of Economic Literature (JEL)
    R41 Transportation: Demand, Supply, and Congestion • Travel Time • Safety and Accidents • Transportation Noise R4 Journal of Economic Literature (JEL)
    O18 Urban, Rural, Regional, and Transportation Analysis • Housing • Infrastructure O1 Journal of Economic Literature (JEL)
    J61 Geographic Labor Mobility • Immigrant Workers J6 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
    Modified BSD3 https://opensource.org/license/bsd-3-clause/

    Contacts

    Contacts
    Name Affiliation Email
    Javier E. Baez World Bank jbaez@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

    2025-11-22

    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.