This supplemental archive contains code for the paper titled "Spatial perspective on environmental migration: Empirical insights from a spatio-temporal approach in the United States, 1970–2010". Please note that the data files are too large to upload online or deposit on GitHub. Readers are encouraged to contact the authors to obtain the data files. The analyses were conducted using Stata 16.1 and Python 3.9. All paths in the Stata and Python scripts are specified as relative paths. To run these scripts, please follow the folder structure below: +---data | +---county_cus.zip | +---nmr_long.dta | +---spmdl_detailed_age.dta | ... (and more) +---results | +---table_1.doc | +---table_2.doc | +---figure_1.png | ... (and more) +---figure_1.py +---figure_a1.py +---table_3_old.do +---... (and more) Please place all Stata and Python scripts in the root folder and store the data in the "data" folder. The "results" folder contains the output files (e.g., descriptive statistics, regression tables, and figures). Note that not every table (e.g., data sources in Table A1) or figure (e.g., Queen's contiguity weighting rules in Figure A4) needs to be replicated. Each script generates the table or figure corresponding to its filename (e.g., table_1.do produces Table 1 in the manuscript and figure_1.py produces Figure 1 in the manuscript).