This is the replication materials for the paper "Subnational Contribution to Life expectancy and Lifespan Variation Changes: Evidence from the US" by Wen Su, Alyson van Raalte, José Manuel Aburto, and Vladimir Canudas-Romo published in Demographic Research. Please contact Wen Su (Wen.Su@anu.edu.au) for questions regarding codes. The software used in this project is R 4.3.1 and R Studio version 2023.12.1 The replication materials contain three folders: Data: storing raw, uncleaned data from USAMD, and CDC Wonder. Codes: Containing r codes to clean, calculate, and visualize the results. Report: Contains the figures that you see in the main text and the manuscript. Steps to make the replication work: 1. Preparation Please download the data from the USA mortality database at https://USA.mortality.org. The USA mortality database will require you to first register and second to log in with the credentials. Please then find the zipped data download link "lifetables.zip" and download and unzip it in the "Data" folder. The USA mortality data should have life tables for females and males for each state. Life tables for either sex for a given state should also have the format of standard life tables by year and single-year age group. We will use mainly the mortality rates for these data. Please also download the population data from CDC Wonder, by each year for States, and for the total population from 2010-2020. The CDC Wonder requires no registration and can be accessed from: https://wonder.cdc.gov. An example has been given in the folder named "CDC" in the Data folder. The CDC population data should contain the population estimates at July 1st at each age, for each US state, females, and males. 2. Click on the icon of R projects named "edagger_decomp.Rproj". Running the r codes in the following order: First, in the "prep" sub-folder, run the r codes "Creating_label.R", this is to create a table of states and their respective Census divisions and Census regions. Then, run the script "Data_cleaning_pop.R", this is to extract the population data from the CDC folder by state, sex, and age. Lastly, run the "pool_mor_main.R" to get the mortality rates from the life table from each state. Secondly, open the calc folder. You can run the scripts in this folder freely. The script "Function.R" contains all the necessary functions we need for the following calculations. The script "Decomposition_e0.R" and "Decomposition_edag.R" calculate the results you see in the main manuscript. Meanwhile, the "Threshold.R" script calculates the threshold age we also mentioned in the manuscript. (For these scripts, you need to change the parameters between female and male, 2010-2019 and 2019-2020 to have different sets of results covered in the manuscript). Lastly, open the sub-folder "vizu". This folder contains all the R scripts to plot the figures you see in the main manuscript. The R script "Visual-snake-plot" plots the Figure 1 you see in the main manuscript. The R script "Visualization_individual regions" plots Figure 2 you see in the main manuscript. The R script "Visual-contributions_1.R" plots the figures 3 and 5 you see in the main manuscript and other figures in the Appendix. The R script "Vissual-contributions_2.R" plots the figure 4 you see in the main manuscript and other figures in the Appendix. The R scripts "Visual-div_state.R" and "Visualising_growth.R" plot figures you see in the appendix. 3. You can access the figures in the folder titled "Report".