This repository contains the code, data and, the output tables and figures used in the paper “The Long Shadow of Housing Discrimination: Evidence from Racial Covenants”, published in the Review of Economic Studies, by Aradhya Sood and Kevin Ehrman-Solberg.
Aradhya Sood
aradhya.sood@rotman.utoronto.ca
racial-covenants/
├── run_order.txt ← Pipeline execution order and instructions
├── README.md
│
├── Data/
│ ├── RAW/ ← Original source data (inputs to pipeline)
│ │ ├── 1940 ED Data/ ← 1940 Enumeration District shapefiles
│ │ ├── AHS_Minneapolis_StPaul/ ← American Housing Survey files
│ │ │ └── [1974, 1977, 1981, 1985, 1989, 1993, 1998, 2007, 2013, 2017, 2021]/
│ │ ├── BLM/ ← BLM civil disturbance shapefiles
│ │ ├── Census Shape Files/ ← Census boundary shapefiles by year
│ │ │ └── [1940, 1960, 1980, 1990, 2000, 2010, 2020]/
│ │ ├── Census non-spatial data/ ← Census tabular data
│ │ │ ├── 1940 Enumeration District/
│ │ │ ├── Census Block/
│ │ │ │ └── [1980, 1990, 2000, 2010, 2020]/
│ │ │ ├── Census Block Group/
│ │ │ │ └── [1990, 2000, 2010, 2020]/
│ │ │ ├── Census County/
│ │ │ │ └── [1940, 1960, 1980, 1990, 2000, 2010, 2020]/
│ │ │ └── Census Tract/
│ │ │ └── [1940, 1960, 1980, 1990, 2000, 2010, 2020]/
│ │ ├── City Boundary/ ← Minneapolis city boundary shapefile
│ │ ├── Covenant Data/ ← Racial covenant shapefiles and CSV
│ │ │ └── covshp/
│ │ ├── CPI/ ← Consumer Price Index data
│ │ ├── Election 1961 Shape Files/ ← 1961 ward and precinct shapefiles
│ │ ├── Election 1964 1968 Outcome/ ← General election results data
│ │ ├── Hennepin Altitude/ ← Elevation data
│ │ ├── Lakes and Rivers/ ← Metropolitan Council water features
│ │ ├── MLCCS/ ← Minnesota Land Cover Classification System
│ │ ├── Mortgage/ ← Sale and resale data
│ │ ├── OpenStreetMap/ ← Minnesota OSM extract and travel time output
│ │ ├── Parcel Data/ ← 2019 and 2020 Hennepin County parcel shapefiles
│ │ ├── Permit Cards/ ← OCR output from historic building permit cards
│ │ ├── Roads/ ← TIGER/Line primary and secondary roads
│ │ ├── Soil Quality/ ← NRCS Web Soil Survey shapefiles
│ │ ├── Wetland/ ← 1899 historical wetlands shapefile
│ │ ├── Zillow Characteristics/ ← Zillow building characteristics
│ │ ├── Zillow Value/ ← Zillow assessed and sales value files
│ │ └── Zoning Data/ ← Minneapolis zoning shapefile
│ │
│ └── MID/ ← Intermediate pipeline outputs
│ ├── Step 1/ – Step 15/ ← Outputs from each data preparation step
│ ├── For Figures/ ← Intermediate files used by figure scripts
│ │ ├── AHS_Minneapolis_StPaul/
│ │ ├── Counting Races/
│ │ └── fig2/
│ └── For Model Code/ ← Intermediate files used by model scripts
│
├── Programs/
│ ├── 00_housekeeping.do ← Sets all global Stata directory paths
│ ├── Data Code/ ← Steps 01–15f: constructs analysis_withcensus.dta
│ ├── Figures and Tables Code/
│ │ ├── Figures/ ← One subfolder per figure in the paper
│ │ │ ├── Fig 2 (Expansion of New Construction and Racial Covenants)/
│ │ │ ├── Fig 3, C.1 (Covenants in Transition Neighbourhoods)/
│ │ │ ├── Fig 4, C.1 (Time to Build and Baseline Sample)/
│ │ │ ├── Fig 5 (Percentage of Minority Residents)/
│ │ │ ├── Fig 6 (Externality Effects of Racial Covenants)/
│ │ │ ├── Fig A.2 (Covenants Executed per Year)/
│ │ │ ├── Fig B.1 (Mean Number of Races Listed in Covenants Per Year)/
│ │ │ ├── Fig B.2 (Planned vs. Constructed Highways)/
│ │ │ ├── Fig C.2 (Segregation Externality Effects)/
│ │ │ ├── Fig C.3 (Property Tear Down Rate)/
│ │ │ └── helper files/
│ │ └── Tables/ ← .texdoc files for each table; see Table Creation Master File.txt
│ └── Model Code/ ← Stata .do files for all regressions and model output
│
└── Results/
├── figures/ ← Figure output (dated subfolders by run)
└── tables/ ← Table output (.tex files, dated subfolders by run)
Programs/00_housekeeping.do: Sets all
global Stata directory paths (${raw}, ${work},
${code}, ${results}, etc.).Programs/Data Code/: Contains 15
numbered steps (many with sub-steps) that transform raw data sources
into the final analysis dataset analysis_withcensus. Steps
consist of a mix of Jupyter notebooks (.ipynb), Stata
do-files (.do).Programs/Model Code/: Contains Stata
do-files for all regression models, balance tests, robustness checks, IV
regressions, placebo tests, and auxiliary analyses.Programs/Figures and Tables Code/Tables/:
The file Table Creation Master File.txt indicates how all
table generation can be done using .texdoc files. Each
.texdoc file re-runs the relevant model code and formats
the output as a LaTeX table saved to {results}tables/.Programs/Figures and Tables Code/Figures/:
Subfolders organized by figure number each contain the scripts to
produce the corresponding figure. Output is saved to
{results}figures/.The code in this replication package constructs the analysis file
from 23 datasets using both Stata and Python (Jupyter notebooks). The
code files listed under Programs/Data Code/ run all of the
code to generate the data for analysis. The code files listed under
Programs/Model Code/ generate the 5 figures and 5 tables in
the paper, as well as all the online appendix tables and figures.
The repository does not use a single executable master script because
the workflow alternates between Stata do-files and Jupyter notebooks.
Instead, the file Programs\run_order.txt provides the exact
execution order of all scripts required to reproduce the analysis. To
reduce the number of individual files a replicator must run, convenience
runner scripts have been added for Steps 4, 5–8, and 10–14b:
04_Data-Prep.py and 04_Data-Prep.do cover all
Step 4 files; 05-08_Data-Prep.py covers Steps 5–8; and
10-14b_Data-Prep.do covers Steps 10–14b. Each runner
executes its constituent scripts in the correct order and halts
immediately on any error. The file (run_order.txt) outlines
the steps to run all data code 15 steps (Steps 01 - 15f), producing the
main analysis file analysis_withcensus. Model estimation
and figure/table generation follow. Scripts must be executed
sequentially and should not be run in parallel because later steps
depend on intermediate files generated by earlier steps.
The replicator should expect the code to run for approximately 90-120 minutes on a standard desktop machine.
Some data cannot be made publicly available. A summary of data availability is provided below. The data below is divided into 3 categories:
I certify that the authors of the manuscript have documented permission to redistribute/publish the data contained within this replication package. Appropriate permissions are documented below.
These files represent primary datasets created and extracted directly from historical archives, historical image or PDF maps, and historical documents; comprehensive instructions on how to access the original source media are provided within this replication package. These data were collected and processed by the authors and are available for public use. Specifically, the data repository consists of four types of primary data. First, it includes spatial shapefiles generated from historical maps. For these records, the exact source links to the original archival maps are detailed in the documentation, allowing future replicators to rasterize and digitize the map layouts independently if desired. Second, it includes comprehensive building permit records along with Hennepin County’s general election results from 1964 and 1968. These tabular attributes were systematically compiled by the authors from raw historical archives using an optical character recognition (OCR) program via the Amazon Textract software. Third, it includes data on the first sale of new houses built and their subsequent resale of these houses for a sample of houses in the data using the historical sale register. Fourth, it includes the car travel time between each parcel and its nearest highway exit calculated using Open Street Map (OSM).
Four restricted data files are omitted from the public replication package. Three of these files contain proprietary data from other authors; the README provides details on who to contact for these files. The fourth file contains Zillow ZTRAX data, which must now be accessed via restricted clearance through the University of Michigan’s Inter-university Consortium for Political and Social Research (ICPSR). Detailed access instructions for all four datasets are provided in the README and listed below. Restricted datasets are required only for constructing intermediate variables and do not prevent reproduction because derived variables are provided.
| Data Name | Data Files | Location | Provided | Citation |
|---|---|---|---|---|
| 2019 Parcel Data | hennepin_county_parcels.shp |
{raw}Parcel Data/ |
Yes | GIS Office, Hennepin County, Minnesota |
| Covenants Data | Hennepin_All_Joined_Final_Del_Identical_8_21_2020.shp;
more_covenants.csv |
{raw}Covenant Data/ |
Yes; No | Mapping Prejudice direct download; Mapping Prejudice email request |
| Assessed and Sales Value and Building Characteristics from Zillow | run_order.txt; Value.txt;
Building.txt; BKManagedSpecific.txt;
BuildingAreas.txt; TypeConstruction.txt;
Layout.xlsx;
building_characteristic_cols.csv |
{raw}Zillow Value/;
{raw}Zillow Characteristics/ |
No | Zillow |
| MLCCS Data | Minnesota_Land_Cover_Classification_System_(MLCCS).shp |
{raw}MLCCS/ |
Yes | MLCCS, Minnesota DNR |
| Lakes and Rivers Shapefile | LakesAndRivers.shp |
{raw}Lakes and Rivers/ |
Yes | Minnesota Metropolitan Council |
| TIGER Roads Shapefile | tl_2021_27_prisecroads.shp |
{raw}Roads/ |
Yes | U.S. Census Bureau |
| BLM Minor Disturbances Data | DamagedProperties.shp |
{raw}BLM/ |
Yes | City of Minneapolis Open Data Portal |
| 1960–2020 Census Boundary Shapefiles | Shapefiles in year subfolders | {raw}Census Shape Files/ |
Yes | U.S. Census Bureau and NHGIS and Minnesota Geospatial Commons |
| 1940–2020 Census Block Data | Files in year subfolders | {raw}Census non-spatial data/Census Block/ |
Yes | NHGIS and U.S. Census Bureau |
| 1940–2020 Census Tract Data | Files in year subfolders | {raw}Census non-spatial data/Census Tract/ |
Yes | NHGIS and U.S. Census Bureau |
| 1990–2020 Census Block Group Data | Files in year subfolders | {raw}Census non-spatial data/Census Block Group/ |
Yes | NHGIS and U.S. Census Bureau |
| 1940 Enumeration District Data | ED_1940_Suburbs_v9.shp |
{raw}1940 ED Data/ |
Yes | Almagro, Ehrman-Solberg, and Sood (2026) |
| 1940 Enumeration District Census Data | Files in subfolders | {raw}Census non-spatial data/1940 Enumeration District/ |
Yes | NHGIS |
| NHGIS 1960 Tract Data | nhgis0007_ds92_1960_tract.csv |
{raw}Census non-spatial data/Census Tract/1960/ |
Yes | NHGIS |
| Tract Immigrant and Foreign Origin 1940 and 1960 Data | Files in year subfolders | {raw}Census non-spatial data/Census Tract/ |
Yes | NHGIS |
| 1980–2020 Education Data | Files in year subfolders | {raw}Census non-spatial data/ |
Yes | NHGIS |
| 1980–2020 Income Data | Files in year subfolders | {raw}Census non-spatial data/ |
Yes | NHGIS |
| CPI Data | CPIAUCSL.csv |
{raw}CPI/ |
Yes | U.S. Bureau of Labor Statistics |
| Minneapolis City Boundary | City_Boundary.shp |
{raw}City Boundary/ |
Yes | City of Minneapolis Open Data Portal |
| 1961 Election Ward and Precinct Shapefile | 1961 precinct.shp |
{raw}Election 1961 Shape Files/ |
Yes | Sood (2026a) |
| 1964 and 1968 Election Outcomes | Hennepin Data.xlsx |
{raw}Election 1964 1968 Outcome/ |
Yes | Sood (2026b) |
| Index Building Permit Cards | df2_batch*.csv; df3_batch*.csv |
{raw}Permit Cards/ |
Yes | Sood (2026c) |
| OSM Travel Time Data | minnesota-latest.osm.pbf;
housing_tt_s1100.csv |
{raw}OpenStreetMap/ |
Yes | Sood (2026d) |
| Hennepin Altitude Data | hennepin_lots_altitude_slope.shp |
{raw}Hennepin Altitude/ |
Yes | Hennepin County GIS |
| Historical Wetlands Data | HENNEPIN_wetlands.shp |
{raw}Wetland/ |
No | Almagro and Sood (2026) |
| Soil Quality Data | HC_NRCS_Soils.shp |
{raw}Soil Quality/ |
Yes | Soil Survey Staff, Natural Resources Conservation Service, USDA |
| Sale and Resale Data | Completed_mortgage_file.csv |
{raw}Mortgage/ |
Yes | Sood (2026d) |
| American Housing Survey Data | Files in year subfolders (1974, 1981, 2013) | {raw}AHS_Minneapolis_StPaul/ |
Yes | U.S. Census Bureau & HUD |
| Zoning Data | county_all_parcels_with_demo.shp |
{raw}Zoning Data/ |
No | Webster & Corey, 2021 |
Protacted and Manually Cleaned Data Files: Step 3b of the data pipeline includes a manual annotation process to classify lakes not originally seen in both MLCCS and Lakes and Rivers shapefiles. The results of the google search process to determine lakes is written directly into the code file as part of the repication package.
Step 9 of the data pipeline uses permit card OCR data
(df2_batch*.csv and df3_batch*.csv) generated
from the Minneapolis Historic Building Permits Index Cards housed at the
Hennepin County Library Digital Collections. The raw archival image
files are omitted from this replication package; future researchers
wishing to rebuild the image cache must download the cards manually or
via an automated scraping script, then process them using OCR (e.g.,
Amazon Textract or equivalent). The processed tabular output is included
in this replication package. In addition, some OCR output was not
complete and needed to be manually read and updated and is written
directly into the code file as part of the repication package.
Step 10 of the data pipeline uses housing_tt_s1100.csv which is the outcome of mapping the travel time from each parcel to the nearest highway exit using Open Street Map data. This process took over 3 weeks of continuous execution due to API limits on the public OSRM server. The resulting file is included in the replication package for direct download, but future replicators can bypass the over 3-week external API restriction by utilizing third-party paid commercial services, if they so choose.
The replication package does not rely on a single executable script.
Because the workflow alternates between Stata and Jupyter notebooks,
replication is orchestrated through the file
Programs\run_order.txt, which specifies the exact order in
which all scripts should be executed.
Some data cannot be made publicly available. Note that restricted datasets are required only for constructing intermediate variables and do not prevent reproduction because derived variables are provided.
Raw data
↓
Programs/Data Code (Steps 01–15f)
↓
analysis_withcensus.dta
pretrend_variables.dta
↓
Programs/Model Code
↓
Programs/Figures and Tables Code
↓
Results/
├── tables/
└── figures/
These 45 code files construct the analysis dataset from raw data
across 15 numbered steps. Full execution order and descriptions are in
run_order.txt.
| Step | File | Description |
|---|---|---|
| 1 | 01_Data-Prep.ipynb |
Joins residential parcels with racial covenant data |
| 2 | 02_Data-Prep.ipynb |
Merges Zillow building characteristics with parcel-covenant data |
| 3a | 03a_Data-Prep.ipynb |
Identifies lakes from MLCCS and Met Council shapefiles for manual review |
| 3b | 03b_Data-Prep.do |
Confirms ambiguous water bodies as lakes or ponds |
| 3c | 03c_Data-Prep.ipynb |
Calculates distance from each parcel to nearest lake and highway |
| 3d | 03d_Data-Prep.ipynb |
Calculates distance to nearest river; updates overall nearest-water variable |
| 3e | 03e-Data_Prep.ipynb |
Merges BLM civil disturbance data with parcels via spatial join |
| 4 | 04_Data-Prep.py (runner) |
Executes all Step 4 notebooks in order (run before
04_Data-Prep.do) |
| 4 | 04_Data-Prep.do (runner) |
Executes all Step 4 Stata files (run after
04_Data-Prep.py) |
| 4 | 04_Data-Prep.ipynb |
Spatially links parcels to census geographies (blocks, tracts, EDs) for 1940–2020 |
| 4 | 04-1940_Data-Prep.ipynb |
Merges 1940 census demographic data by enumeration district |
| 4 | 04-1960_Data-Prep.ipynb |
Merges 1960 census demographic data by tract |
| 4 | 04-1980_Data-Prep.ipynb |
Merges 1980 census demographic data by block and tract |
| 4 | 04-1990_Data-Prep.ipynb |
Merges 1990 census demographic data by block and block group |
| 4 | 04-2000_Data-Prep.ipynb |
Merges 2000 census demographic data by block and block group |
| 4 | 04-2010_Data-Prep.ipynb |
Merges 2010 census demographic data by block and block group |
| 4 | 04-2020_Data-Prep.ipynb |
Merges 2020 census demographic data by block and block group |
| 4 | 04-Income_Data-Prep.ipynb |
Merges census tract-level income data (2000–2020) |
| 4 | 04-Value_Rent_Data-Prep.ipynb |
Merges median home value and rent by block group and tract (1980–2020) |
| 4 | 04-1960-NHGIS_Data-Prep.do |
Prepares 1960 NHGIS tract-level data for merge |
| 4 | 04-Immigrant_Data-Prep.do |
Merges immigrant and foreign-origin share data by census tract for 1940 and 1960 |
| 5–8 | 05-08_Data-Prep.py (runner) |
Executes Steps 5–8 notebooks in order |
| 5 | 05_Data_Prep.ipynb |
Merges and CPI-deflates 2019 and 2020 Zillow assessor values |
| 6 | 06_Data-Prep.ipynb |
Matches parcels with Minneapolis zoning data |
| 7 | 07_Data-Prep.ipynb |
Calculates distance from each parcel to the Minneapolis city boundary |
| 8 | 08_Data-Prep.ipynb |
Spatially joins parcels with 1961 election ward and precinct boundaries |
| 9a | 09a_Data-Prep.ipynb |
Loads and prepares parcel address data for building permit matching |
| 9b | 09b_Data-Prep.do |
Cleans parcel street addresses |
| 9c | 09c_Data-Prep.do |
Imports and appends raw permit card OCR batches |
| 9d | 09d_Data-Prep.do |
Appends and cleans all permit card records |
| 9e | 09e_Data-Prep.ipynb |
First round of address matching between permits and parcels |
| 9f | 09f_Data-Prep.do |
Processes first-round matched and unmatched permit records |
| 9g | 09g_Data-Prep.do |
Prepares unmatched permits for second-round matching |
| 9h | 09h_Data-Prep.ipynb |
Second round of address matching for remaining unmatched permits |
| 9i | 09i_Data-Prep.do |
Finalizes permit-parcel matches after both matching rounds |
| 10–14b | 10-14b_Data-Prep.do (runner) |
Executes Steps 10–14b Stata files in order |
| 10 | 10_Data-Prep.do |
Converts OSM travel time CSV to Stata format and merges with dataset |
| 11 | 11_Data-Prep.do |
Merges 1964 and 1968 Hennepin County general election results |
| 12 | 12_Data-Prep.do |
Cleans and harmonizes education attainment data (1980–2020) by census geography |
| 13 | 13_Data-Prep.do |
Cleans 1980 and 1990 census income data by tract |
| 14a | 14a_Data-Prep.do |
Combines all intermediate datasets into a single pre-analysis file |
| 14b | 14b_Data-Prep.do |
Merges census, zoning, permit, and election data into the main dataset |
| 15a1 | 15a1_Data-Prep.ipynb |
Loads parcel-level altitude data from RAW |
| 15a2 | 15a2_Data-Prep.do |
Saves altitude data at PID and block levels |
| 15b | 15b_Data-Prep.ipynb |
Merges wetland data at PID and block levels |
| 15c | 15c_Data-Prep.ipynb |
Spatially joins wetland boundaries with parcel centroids |
| 15d | 15d_Data-Prep.ipynb |
Calculates soil quality at block and PID levels |
| 15e | 15e_Data-Prep.do |
Merges soil quality data at parcel level |
| 15f | 15f_Data-Prep.do |
Merges all geographic controls; outputs final
analysis_withcensus.dta |
The final analysis datasets analysis_withcensus.dta and
pretrend_variables.dta are fully reproducible from raw data
in approximately 90 minutes. Both are included in this replication
package.
| File | Location | Description |
|---|---|---|
analysis_withcensus.dta |
Data/MID/ |
Final analysis dataset used by all model code |
pretrend_variables.dta |
Data/MID/ |
Pre-trend geographic and demographic variables |
These code files generate the 5 main tables, 5 figures, and all
online appendix tables and figures in the paper. Three scripts,
Block_Level_Data_Creation.do,
Robustness_Sorting_Prices.do, and
IVReg_Data_Creation.do, create intermediate datasets and
must be run before the others.
| File | Tables |
|---|---|
Block_Level_Data_Creation.do |
(intermediate dataset generator, first run through Table 3 via Table3.texdoc) |
Robustness_Sorting_Prices.do |
(intermediate dataset generator, first run through Table 3 via Table3.texdoc) |
IVReg_Data_Creation.do |
(intermediate dataset generator, first run through Table C.11 via TableC11.texdoc) |
Balance_Tests.do |
Table 1 |
House_Char_Baseline_Falsification.do |
Table 2, Table C.1, Table C.4 |
Elections_Civil_Rights.do |
Table 2 |
Neighborhood_Amenities.do |
Table 2, Table C.10 |
Baseline_Sorting.do |
Table 3, Table 5, Table C.2, Table C.5, Table C.6, Table C.8 |
BLM_2020.do |
Table 4 |
Baseline_Price_House_Level.do |
Table 4, Table 5, Table C.3 |
Sale_Resale_Yeargap.do |
Table A.1 |
Summary_Stats_Construction.do |
Table A.2, Table A.3 |
Population_by_Race.do |
Table A.4 |
Price_Covenant_Language.do |
Table C.3 |
ebal_Sorting_Falsification.do |
Table C.7 |
Sorting_Placebo_Timelines.do |
Table C.9 |
Prices_Placebo_Timelines.do |
Table C.9 |
Sorting_IVReg.do |
Table C.11 |
Price_IVReg.do |
Table C.11 |
Model Code also produces several intermediate datasets used for
specific analyses and robustness checks. The main analysis dataset
analysis_withcensus.dta is the starting point for all model
code, and the year-conditional datasets are used for specific robustness
checks and alternative specifications.
| File | Location | Description |
|---|---|---|
analysis_withcensus_cond_XXXX.dta (XXXX=1980–2020) |
Data/MID/For Model Code/ |
Analysis dataset conditioned on census year XXXX |
analysis_withcensus_cond_XXXX_missing4748.dta
(XXXX=1980–2020) |
Data/MID/For Model Code/ |
Year-conditional dataset excluding years 1947–48; generated by
Robustness_Sorting_Prices.do |
analysis_withcensus_cond_alt_XXXX.dta
(XXXX=1980–2020) |
Data/MID/For Model Code/ |
Alternative specification year-conditional dataset |
analysis_withcensus_cov3_XXXX.dta (XXXX=1980–2020) |
Data/MID/For Model Code/ |
Year-conditional dataset using covenant-3 treatment definition |
population_race_XXXX.dta (XXXX=1940–2020) |
Data/MID/For Model Code/ |
Population by race for each census year |
| File | Table(s) |
|---|---|
Tables/Table1.texdoc |
Table 1 |
Tables/Table2.texdoc |
Table 2 |
Tables/Table3.texdoc |
Table 3 |
Tables/Table4.texdoc |
Table 4 |
Tables/Table5.texdoc |
Table 5 |
Tables/TableA1.texdoc |
Table A.1 |
Tables/TableA2_A3.texdoc |
Table A.2, Table A.3 |
Tables/TableA4.texdoc |
Table A.4 |
Tables/TableC1_C4.texdoc |
Table C.1, Table C.4 |
Tables/TableC2.texdoc |
Table C.2 |
Tables/TableC3.texdoc |
Table C.3 |
Tables/TableC5.texdoc |
Table C.5 |
Tables/TableC6.texdoc |
Table C.6 |
Tables/TableC7.texdoc |
Table C.7 |
Tables/TableC8.texdoc |
Table C.8 |
Tables/TableC9.texdoc |
Table C.9 |
Tables/TableC10.texdoc |
Table C.10 |
Tables/TableC11.texdoc |
Table C.11 |
| File | Figure(s) |
|---|---|
Figures/Fig 2 (Expansion of New Construction and Racial Covenants)/Data selection for maps.do |
Figure 2 |
Figures/Fig 2 (Expansion of New Construction and Racial Covenants)/new_construction_racial_cov_map.ipynb |
Figure 2 |
Figures/Fig 3, C.1 (Covenants in Transition Neighbourhoods)/Cov_Boundary_Distance.do |
Figure 3 |
Figures/Fig 3, C.1 (Covenants in Transition Neighbourhoods)/Transition_Zones_1940ED.do |
Figure 3, Figure C.1 |
Figures/Fig 4, C.1 (Time to Build and Baseline Sample)/ex_build_yeargap.do |
Figure 4 |
Figures/Fig 4, C.1 (Time to Build and Baseline Sample)/graph_covenants_overtime_edited.do |
Figure 4 |
Figures/Fig 4, C.1 (Time to Build and Baseline Sample)/Distribution of Covenant Enforceability.do |
Figure 4, Figure C.1 |
Figures/Fig 5 (Percentage of Minority Residents)/2026_1960_Tract_analysis.do |
Figure 5 |
Figures/Fig 6 (Externality Effects of Racial Covenants)/Externality_Price_Analysis.do |
Figure 6 |
Figures/Fig A.2 (Covenants Executed per Year)/Exyear_prob.do |
Figure A.2 |
Figures/Fig B.1 (Mean Number of Races Listed in Covenants Per Year)/counting_races.ipynb |
Figure B.1 |
Figures/Fig B.1 (Mean Number of Races Listed in Covenants Per Year)/plotting_raceslisted_peryear.do |
Figure B.1 |
Figures/Fig B.2 (Planned vs. Constructed Highways)/highway_map.ipynb |
Figure B.2 |
Figures/Fig C.2 (Segregation Externality Effects)/Sorting Treatment Dummy Graph.do |
Figure C.2 |
Figures/Fig C.3 (Property Tear Down Rate)/2025_AHS_timeseries.do |
Figure C.3 |
Stata (code was last run with version 19.5):
estouttexdocebalancesuestrdrobustreghdfeftoolscoefplotstrkeepPython (code was last run with version 3.12.6):
geopandaspandasnumpyshapelymatplotlibfoliumfionapyprojPillowjupyternbconvertnbformatipykernelopenpyxlxlrdApproximate time needed to reproduce the analyses on a standard (2025) desktop machine:
Approximate storage space needed:
The code was last run on a 2023 MacBook Pro with 36GB of memory.
All project paths are defined relative to the repository root. Before running any code, set Stata's working directory to the cloned repository.
Mac/Linux cd "/path/to/The-Long-Shadow-of-Housing-Discrimination-Evidence-from-Racial-Covenants"
Windows cd "C:\path\to\The-Long-Shadow-of-Housing-Discrimination-Evidence-from-Racial-Covenants"
Then run:
do 00_housekeeping.do
The housekeeping script automatically defines all project directories relative to the repository root:
global root "`c(pwd)'/"
As a result, users do not need to edit any file paths after cloning the repository.
Download all raw data sources listed in the Data Details and
Availability section and place them in the appropriate
subdirectories under Data/ as specified in
00_housekeeping.do.
To replicate the full analysis pipeline, authorized researchers must separately obtain the following restricted datasets and place them manually into their corresponding directories:
Zoning Data Data/RAW/Zoning Data/county_all_parcels_with_demo.*
Zillow Data Data/RAW/Zillow Value/ Data/RAW/Zillow Characteristics/
Wetland Data Data/RAW/Wetland/HENNEPIN_wetlands.*
Covenant Data (Restricted Supplement) Data/RAW/Covenant Data/more_covenants.csv
Several files exceed GitHub's size limits and are stored as compressed archives. Unzip the following files before running any code.
Hennepin Altitude Data Data/RAW/Hennepin Altitude/hennepin_lots_altitude_slope.dbf.zip → Data/RAW/Hennepin Altitude/hennepin_lots_altitude_slope.dbf
Required by Step 15a1 of the data pipeline.
1940 Enumeration District Data Data/RAW/Census non-spatial data/1940 Enumeration District/usa_00001.csv.zip → Data/RAW/Census non-spatial data/1940 Enumeration District/usa_00001.csv
Required by the 1940 census data processing scripts.
Figure 2 Intermediate File Data/MID/For Figures/fig2/combined_with_mark.dbf.zip → Data/MID/For Figures/fig2/combined_with_mark.dbf
Required to reproduce Figure 2.
1960 Census Intermediate File Data/MID/Step 4/census_data_pid_1960.csv.zip → Data/MID/Step 4/census_data_pid_1960.csv
Required by Step 4 of the data pipeline.
Ensure that Stata and Python are installed and available on your system PATH. Install all Python packages listed in the software requirements section before executing the code.
The runner scripts (04_Data-Prep.py,
05-08_Data-Prep.py) execute notebooks programmatically via
nbconvert. After installing the Python packages, register
your Python installation as a Jupyter kernel so the runners can find
it:
pip install nbconvert nbformat ipykernel
python3 -m ipykernel install --user --name python3 --display-name "Python 3"Use run_order.txt to execute the data pipeline in the
prescribed order (Steps 1–15f). Running these scripts produces the final
analysis dataset:
analysis_withcensus.dta
After the analysis dataset has been generated, run the figure and table scripts to reproduce all results reported in the paper.
The run_order.txt file provides detailed instructions
regarding the execution order and dependencies of all scripts.
Programs/00_housekeeping.do: Must be
configured with the replicator's username and root path before running
anything.Programs/Data Code/: Steps must be run
in order (01 → 02 → … → 15f). run_order.txt states this
order.Programs/Model Code/:
Block_Level_Data_Creation.do,
IVReg_Data_Creation.do, and
Robustness_Sorting_Prices.do must run before the scripts
that depend on their output. Individual model scripts can otherwise be
run independently once the analysis dataset
(analysis_withcensus) or other intermediate files like
analysis_withcensus_cond_XXXX.dta (XXXX=1980–2020) are
available.Programs/Figures and Tables Code/Figures/:
Each subfolder corresponds to one figure in the paper. Scripts within
each subfolder can be run independently once model results are
available.The provided code reproduces all numbers provided in text in the paper as well as all tables and figures in the paper.
Tables are generated by running the .texdoc helper
files, which in turn call the relevant model code scripts. The
.texdoc files are located in
Programs/Figures and Tables Code/Tables/. Output
.tex files are written to {results}tables/.
Figure scripts are located in
Programs/Figures and Tables Code/Figures/ and output is
written to {results}figures/.
Tables
| Table | Model Code Script(s) | .texdoc file |
Output |
|---|---|---|---|
| Table 1 | Programs/Model Code/Balance_Tests.do |
Table1.texdoc |
{results}tables/ |
| Table 2 | Programs/Model Code/House_Char_Baseline_Falsification.do;
Elections_Civil_Rights.do;
Neighborhood_Amenities.do |
Table2.texdoc |
{results}tables/ |
| Table 3 | Programs/Model Code/Baseline_Sorting.do |
Table3.texdoc |
{results}tables/ |
| Table 4 | Programs/Model Code/BLM_2020.do;
Baseline_Price_House_Level.do |
Table4.texdoc |
{results}tables/ |
| Table 5 | Programs/Model Code/Baseline_Sorting.do;
Baseline_Price_House_Level.do |
Table5.texdoc |
{results}tables/ |
| Table A.1 | Programs/Model Code/Sale_Resale_Yeargap.do |
TableA1.texdoc |
{results}tables/ |
| Table A.2 | Programs/Model Code/Summary_Stats_Construction.do |
TableA2_A3.texdoc |
{results}tables/ |
| Table A.3 | Programs/Model Code/Summary_Stats_Construction.do |
TableA2_A3.texdoc |
{results}tables/ |
| Table A.4 | Programs/Model Code/Population_by_Race.do |
TableA4.texdoc |
{results}tables/ |
| Table C.1 | Programs/Model Code/House_Char_Baseline_Falsification.do |
TableC1_C4.texdoc |
{results}tables/ |
| Table C.2 | Programs/Model Code/Baseline_Sorting.do |
TableC2.texdoc |
{results}tables/ |
| Table C.3 | Programs/Model Code/Baseline_Price_House_Level.do;
Price_Covenant_Language.do |
TableC3.texdoc |
{results}tables/ |
| Table C.4 | Programs/Model Code/House_Char_Baseline_Falsification.do |
TableC1_C4.texdoc |
{results}tables/ |
| Table C.5 | Programs/Model Code/Baseline_Sorting.do |
TableC5.texdoc |
{results}tables/ |
| Table C.6 | Programs/Model Code/Baseline_Sorting.do |
TableC6.texdoc |
{results}tables/ |
| Table C.7 | Programs/Model Code/ebal_Sorting_Falsification.do |
TableC7.texdoc |
{results}tables/ |
| Table C.8 | Programs/Model Code/Baseline_Sorting.do |
TableC8.texdoc |
{results}tables/ |
| Table C.9 | Programs/Model Code/Sorting_Placebo_Timelines.do;
Prices_Placebo_Timelines.do |
TableC9.texdoc |
{results}tables/ |
| Table C.10 | Programs/Model Code/Neighborhood_Amenities.do |
TableC10.texdoc |
{results}tables/ |
| Table C.11 | Programs/Model Code/Sorting_IVReg.do;
Price_IVReg.do |
TableC11.texdoc |
{results}tables/ |
Figures
| Figure | Script(s) | Output |
|---|---|---|
| Figure 1 | ||
| Figure 2 | Programs/Figures and Tables Code/Figures/Fig 2 (Expansion of New Construction and Racial Covenants)/Data selection for maps.do;
new_construction_racial_cov_map.ipynb |
{results}figures/ |
| Figure 3 | Programs/Figures and Tables Code/Figures/Fig 3, C.1 (Covenants in Transition Neighbourhoods)/Cov_Boundary_Distance.do;
Transition_Zones_1940ED.do |
{results}figures/ |
| Figure 4 | Programs/Figures and Tables Code/Figures/Fig 4, C.1 (Time to Build and Baseline Sample)/ex_build_yeargap.do;
graph_covenants_overtime_edited.do;
Distribution of Covenant Enforceability.do |
{results}figures/ |
| Figure 5 | Programs/Figures and Tables Code/Figures/Fig 5 (Percentage of Minority Residents)/2024_1960_Tract_analysis.do |
{results}figures/ |
| Figure 6 | Programs/Figures and Tables Code/Figures/Fig 6 (Externality Effects of Racial Covenants)/Externality_Price_Analysis.do |
{results}figures/ |
| Figure A.2 | Programs/Figures and Tables Code/Figures/Fig A.2 (Covenants Executed per Year)/Exyear_prob.do |
{results}figures/ |
| Figure B.1 | Programs/Figures and Tables Code/Figures/Fig B.1 (Mean Number of Races Listed in Covenants Per Year)/counting_races.ipynb;
plotting_raceslisted_peryear.do |
{results}figures/ |
| Figure B.2 | Programs/Figures and Tables Code/Figures/Fig B.2 (Planned vs. Constructed Highways)/highway_map.ipynb |
{results}figures/ |
| Figure C.1 | Programs/Figures and Tables Code/Figures/Fig 3, C.1 (Covenants in Transition Neighbourhoods)/Transition_Zones_1940ED.do;
Fig 4, C.1 (Time to Build and Baseline Sample)/Distribution of Covenant Enforceability.do |
{results}figures/ |
| Figure C.2 | Programs/Figures and Tables Code/Figures/Fig C.2 (Segregation Externality Effects)/Sorting Treatment Dummy Graph.do |
{results}figures/ |
| Figure C.3 | Programs/Figures and Tables Code/Figures/Fig C.3 (Property Tear Down Rate)/2025_AHS_timeseries.do |
{results}figures/ |
If using this replication package, please cite:
Sood, Aradhya, and Kevin Ehrman-Solberg. "The Long Shadow of Housing Discrimination: Evidence from Racial Covenants." Review of Economic Studies, forthcoming.
Ehrman-Solberg, Kevin, Penny Petersen, Marguerite Mills, Kirsten Delegard, and Ryan Mattke. 2020. Racial Covenants in Hennepin County. Data Repository for the University of Minnesota (DRUM). https://doi.org/10.13020/a88t-yb14.
U.S. Bureau of Labor Statistics. 2022. Consumer Price Index for All Urban Consumers: All Items in U.S. City Average [CPIAUCSL]. FRED, Federal Reserve Bank of St. Louis. Accessed June 25, 2022. https://fred.stlouisfed.org/series/CPIAUCSL.
City of Minneapolis. 2020. Damaged Properties. Minneapolis Open Data Portal. Accessed May 11, 2025. https://opendata.minneapolismn.gov/datasets/cityoflakes::damaged-properties-public/about.
Manson, Steven, Jonathan Schroeder, David Van Riper, Kathryn Knowles, Sarah Kugler, Finn Roberts, and Steven Ruggles. 2023. IPUMS National Historical Geographic Information System: Version 18.0 [Data set]. IPUMS. https://doi.org/10.18128/D050.V18.0.
U.S. Census Bureau. 2021. TIGER/Line Shapefiles: Roads. U.S. Department of Commerce. https://www.census.gov/geographies/mapping-files/time-series/geo/tiger-line-file.html.
U.S. Census Bureau. 2010a. TIGER/Line Shapefiles: 2000 Census Blocks. U.S. Department of Commerce. https://www.census.gov/geographies/mapping-files/time-series/geo/tiger-line-file.html.
U.S. Census Bureau. 2010b. TIGER/Line Shapefiles: 2010 Census Blocks. U.S. Department of Commerce. https://www.census.gov/geographies/mapping-files/time-series/geo/tiger-line-file.html.
U.S. Census Bureau. 2020a. TIGER/Line Shapefiles: 2020 Census Blocks. U.S. Department of Commerce. https://www.census.gov/geographies/mapping-files/time-series/geo/tiger-line-file.html.
U.S. Census Bureau. 2020b. American Community Survey 5-Year Estimates. U.S. Department of Commerce, data.census.gov. Accessed December 30, 2022. https://data.census.gov/.
U.S. Census Bureau. 2010c. American Community Survey 5-Year Estimates. U.S. Department of Commerce, data.census.gov. Accessed December 30, 2022. https://data.census.gov/.
U.S. Census Bureau. 2000. Decennial Census. U.S. Department of Commerce, data.census.gov. Accessed July 29, 2022. https://data.census.gov/.
U.S. Census Bureau. 2010d. Decennial Census. U.S. Department of Commerce, data.census.gov. Accessed July 29, 2022. https://data.census.gov/.
U.S. Census Bureau. 2020c. Decennial Census. U.S. Department of Commerce, data.census.gov. Accessed November 23, 2022. https://data.census.gov/.
Metropolitan Council. 2014. Census TIGER/Line Files, 1990 - Twin Cities Metropolitan Area [Data set]. Minnesota Geospatial Commons. Accessed November 18, 2020. https://gisdata.mn.gov/dataset/us-mn-state-metc-society-census1990tlg.
Soil Survey Staff. 2022. Web Soil Survey. Natural Resources Conservation Service, U.S. Department of Agriculture. Accessed November 21, 2022. https://websoilsurvey.sc.egov.usda.gov/.
OpenStreetMap contributors, and Geofabrik GmbH. 2025. OpenStreetMap Data Extracts for Minnesota, USA. Geofabrik Download Server. Accessed March 11, 2025. https://download.geofabrik.de/north-america/us/minnesota.html.
City of Minneapolis. 2021. City Boundary. Minneapolis Open Data Portal. Accessed December 22, 2026. https://opendata.minneapolismn.gov/datasets/city-boundary/about/.
Hennepin County GIS Office. 2019. Hennepin County Parcels 2019 [Data set]. Hennepin County GIS Hub. Accessed July 11, 2029. https://gis-hennepin.hub.arcgis.com/datasets/7975aabf6e1e42998a40a4b085ffefdf_1/explore.
Zillow Group, Inc. 2019. Zillow Transaction and Assessment Database (ZTRAX): 2019 Version. https://www.zillow.com/ztrax.
Almagro, Milena, and Aradhya Sood. 2026. “Choices or Constraints? Disentangling Preferences from Restrictions in Housing Markets.” Working Paper.
Webster, MaryJo, and Michael Corey. 2021. “How Twin Cities Housing Rules Keep the Metro Segregated.” Star Tribune, July 2021.
Sood, Aradhya. 2026c. Minneapolis Historic Building Permits Data. Retrieved from GitHub. https://github.com/aradhyasood1/Minneapolis-Historic-Building-Permits-Data.
Sood, Aradhya. 2026a. 1961 Minneapolis Electoral Ward and Precinct Map. Retrieved from GitHub. https://github.com/aradhyasood1/1961-Minneapolis-Electoral-Ward-and-Precinct-Map.
Sood, Aradhya. 2026b. Hennepin County 1964 and 1968 General Election Results Data. Retrieved from GitHub. https://github.com/aradhyasood1/Hennepin-County-1964-and-1968-General-Election-Results-Data.
Almagro, Milena, Kevin Ehrman-Solberg, and Aradhya Sood. 2026. Hennepin County 1940 Enumeration District Boundaries. Retrieved from GitHub. https://github.com/aradhyasood1/Hennepin-County-1940-Enumeration-District-Boundaries.
Metropolitan Council. 2019. Lakes and Rivers - Open Water Features [Data set]. Minnesota Geospatial Commons. https://gisdata.mn.gov/dataset/us-mn-state-metc-water-lakes-rivers.
Minnesota Department of Natural Resources. 2014. Minnesota Land Cover Classification System (MLCCS) [Data set]. Minnesota Geospatial Commons. https://gisdata.mn.gov/dataset/biota-landcover-mlccs.
Hennepin County GIS. 2018. Elevation Contours [Data set]. Hennepin County GIS Open Data Portal. https://gis-hennepin.hub.arcgis.com/maps/87b53a073e33481db564305f9cab035b/about.
U.S. Census Bureau, and U.S. Department of Housing and Urban Development. 1974–2017. American Housing Survey (AHS) Public Use Files (1974, 1977, 1981, 1985, 1989, 1993, 1998, 2007, 2013, 2017) [Data sets]. U.S. Census Bureau Portal. https://www.census.gov/programs-surveys/ahs/data.html.
Sood, Aradhya. 2026d. Replication of “The Long Shadow of Housing Discrimination: Evidence from Racial Covenants.” Retrieved from GitHub. https://github.com/aradhyasood1/The-Long-Shadow-of-Housing-Discrimination-Evidence-from-Racial-Covenants.
Template structure adapted from the Social Science Data Editors template README, contributed to by Lars Vilhuber, Miklós Koren, Joan Llull, Marie Connolly, Florian Oswald, and Peter Morrow.