Skip to content

Latest commit

 

History

30 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Better or Worse Job Accessibility? Understanding Changes in Spatial Mismatch: Evidence from Medellín, Colombia

Authors: David Bernal; Gustavo A. García; Jorge Pérez-Pérez

Bernal, D., García, G., and Pérez-Pérez, J. (2025). "Better or Worse Job Accessibility? Understanding Changes in Spatial Mismatch: Evidence from Medellín, Colombia", Journal of Transport Geography, 128:104341


📄 Overview

This repository contains all the code used to replicate the results of the paper:
“Better or Worse Job Accessibility? Understanding Changes in Spatial Mismatch: Evidence from Medellín, Colombia.”

All code (except for the final two scripts) is written in R.


📁 Project Structure

  • Data/
    Contains all data obtained from external sources, including shapefiles.

  • Base/
    Stores intermediate files that are entirely generated by scripts.

  • Output/
    Stores final results:

    • Results/: Data outputs derived from the analysis
    • Tex/: Tables formatted for LaTeX
    • Figueres/: Figures based on the results
  • All files in Base/ and Output/ are fully replicable, as they are produced by running the code.

  • R scripts are stored outside these folders to maintain a consistent working directory and streamline execution.


▶️ How to Run the Code

  1. Start with Master.R

    • This is the main script that runs all other scripts in sequence (52 total).
    • Scripts must be run in order.
  2. Function Scripts

    • Some scripts are utility functions (e.g., Maps_Function.R).
    • Ensure they are in the same folder as Master.R—they are called from other scripts.
  3. Working Directory Setup

    • Scripts begin with:
      setwd(dirname(rstudioapi::getActiveDocumentContext()$path))
    • This ensures the script uses its own path as the working directory—no need to manually set it.

⚠️ Important Notes

  • Do not run Scripts 2 and 3
    These download live data from Google and Bing APIs. You need API keys, and results will differ from the paper due to time sensitivity.

  • 📦 Deprecated R packages

  • 🧰 R Version

    • All scripts were tested in R 4.0.3 (64-bit)
    • Ensure package compatibility with this version.
  • 📊 Stata Scripts

    • The final two scripts are written in Stata (version 16+ required).
    • Follow the instructions in Master.R to run them correctly.

📬 Contact

If you have questions or issues replicating the code, feel free to reach out:

About

This code generates the results of the paper "Better or worse job accessibility? Understanding changes in spatial mismatch: evidence from Medellín, Colombia"

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages