The enclosed files allow users to replicate the results in "The Global Spatial Distribution of Economic Activity: Nature, History, and the Role of Trade" by Henderson, Squires, Storeygard and Weil

Stata version 12.1 is required. The Stata do-file tables_adam.do calculates nearly all tables, graphs and statistics in the paper. It calls rego.ado (by Frank Huettner and Marco Sunder) and cuts_fe.ado. conleyonly.do calculates Conley (1999) standard errors, as referred to in a footnote. It is separated because of the long time it takes to run. 

makegrids.py is Python code to convert stata output into the grids mapped in Figures 1, 2a and 2b. It requires ArcGIS and Python.

The following data are required as inputs:
- data1_12slim.dta - This is the core dataset containing physical geography variables for quarter-degree grid squares. It also contains latitude, longitude, and 2010 population and lights values.
- maddison_and_codes.dta contains Bolt and van Zanden's (2014)estimates of GDP per capita by country in 1950, as well as two country identifiers. The Bolt and van Zanden data were downloaded from http://www.ggdc.net/maddison/maddison-project/data/mpd_2013-01.xlsx on 15 May 2017
- BL2013_MF1599_v2.1.dta contains educational attainment for the population over age 15 from Barro and Lee (2010) downloaded from  http://www.barrolee.com/data/BL_v2.1/BL2013_MF1599_v2.1.dta on 15 May 2017
- WUP2014-F00-Locations.xls contains country codes from United Nations (2014) downloaded from  https://esa.un.org/unpd/wup/CD-ROM/WUP2014_XLS_CD_FILES/WUP2014-F00-Locations.xls on 15 May 2017
- WUP2014-F03-Urban_Population.xls contains urban population data from United Nations (2014) downloaded from  https://esa.un.org/unpd/wup/CD-ROM/WUP2014_XLS_CD_FILES/WUP2014-F03-Urban_Population.xls on 15 May 2017
-  WUP2014-F03-Total_Population.xls contains urban population data from United Nations (2014) downloaded from  https://esa.un.org/unpd/wup/CD-ROM/WUP2014_XLS_CD_FILES/WUP2014-F05-Total_Population.xls  on 15 May 2017
- data_and_online_appendix.xlsx contains data on lights, GDP per capita and population density for a sample of subnational regions from Gennaioli et al. (2014) downloaded from  https://scholar.harvard.edu/files/shleifer/files/data_and_online_appendix.xlsx on 15 May 2017
- regions_data_web_july2012.xls contains data on average level of education for a sample of subnational regions from Gennaioli et al. (2013) downloaded from  
https://scholar.harvard.edu/files/shleifer/files/regions_data_web_july2012.xls on 15 May 2017
- API_AG.LND.TOTL.K2_DS2_en_excel_v2.xls contains land area by country, downloaded from http://api.worldbank.org/v2/en/indicator/AG.LND.TOTL.K2?downloadformat=excel on 15 May 2017
- LiteracyRatesGlobalLongRun.csv contains literacy data for several countries, downloaded from http://ourworldindata.org/roser/graphs/LiteracyRatesGlobalLongRun/LiteracyRatesGlobalLongRun.csv on 18 May 2017

India Literacy data sources:

India 1901-1951:
UNESCO. 1957. World Illiteracy at Mid-Century: A Statistical Study. Paris, UNESCO
http://unesdoc.unesco.org/images/0000/000029/002930eo.pdf

India 1971 15+:
Ministry of Human Resource Development. 1987. A Hand Book of Educational and Allied Statistics. New Delhi. http://www.teindia.nic.in/mhrd/50yrsedu/g/Z/EJ/0ZEJ0401.htm
Accessed 9 August 2015

India 1981, 1991, 2001:
World Bank. 2015. World Development Indicators online. Accessed 9 Aug 2015. 

