Skip to content

katesnelson/MultiscalarSVI

Repository files navigation

MultiScalar SVI

This repo holds code associated with the development of social vulnerability indices using a consistent set of indicator variables and varying resolutions (block group, census tract, county) and spatial extents (county, state, U.S.). The SVI data is published on Zenodo and can be downloaded at https://zenodo.org/records/15609876.

The paper associated with this data is published in the International Journal of Disaster Risk Reduction at https://doi.org/10.1016/j.ijdrr.2025.105513.

Citation Information

If you use the code in this repo please cite the paper as:
Nelson, K. S. (2025). Where scale matters for social vulnerability indices: a multiyear analysis of the United States. International Journal of Disaster Risk Reduction, 125, 105513.https://doi.org/10.1016/j.ijdrr.2025.105513

If you use the SVI data please cite the data as:
Nelson, K., & Goodman, C. (2025). Multiscale Social Vulnerability in U.S. [Data set]. In International Journal of Disaster Risk Reduction (Vol. 125, Number 105513). Zenodo. https://doi.org/10.5281/zenodo.15609876

Code Run Notes

To run the python - R interactive script.

  1. Go to the folder/directory holding the python and R scripts
  2. Hold Shift + right-clisk and select "Open PowerShell window here"
  3. Type python final_Copy.py to start running the python script.
  4. Enter responses to the prompts a) if you want to pull information for all states type 'ALL', for state by state data you can type in the full name or state abbreviation, for multiple states separate state names/abbreviation with a space b) for census tract data type 'tract' for block group data type 'block group' c) To just transform data enter the name of the file without the file ending

To modify the data used for SVI construction

  1. Add your census api key to the source.R script under ##KEY###.
  2. If adding any new variables, add the required census variable IDs to the Key.csv and to the temp list in final.py line 92
  3. If the new variables draw from a new census table add the table ID to source.R line 43
  4. If adding new variables, add them to the col_constr.csv file, including how any normalization or arthimetic needs to be computed.

If you encounter an error like this "UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf1 in position 5574: invalid continuation byte" you probably have a census table with an encoding error. Find the offending state file and use Notepad++ to convert the encoding to utf-8. Then rerun the table transformation part of the script.

Creative Commons Attribution Share Alike 4.0 International

About

Scripts for automated construction of social vulnerability indexes in the style of SoVI.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors