deprivateR provides a unified API for accessing and calculating measures of socioeconomic deprivation in the United States, including the Area Deprivation Index (ADI), Neighborhood Deprivation Index (NDI), and the Social Vulnerability Index (SVI). The Gini Coefficient can also be returned, though it is not re-calculated on the fly.
dep_set_api_key() function for easier Census API key setupcli
The easiest way to install deprivateR is from CRAN:
install.packages("deprivateR")Alternatively, you can install the development version from GitHub with remotes:
# install.packages("remotes")
remotes::install_github("pfizer-opensource/deprivateR")deprivateR retrieves data from the U.S. Census Bureau via tidycensus, which requires a free API key. If you’ve already configured tidycensus, no additional setup is needed. Otherwise, use dep_set_api_key() to store your key.
The core function is dep_get_index(), which returns the specified index for a given geography and year:
dep_get_index(geography = "county", state = "MO", index = "adi", year = 2022)See the Getting Started vignette for a full walkthrough of all supported indices, sample data workflows, and spatial output.
deprivateR would not be possible without the sociome and ndi packages. The sociome package’s development was led by Nik Krieger, and the ndi package’s author is Ian D. Buller — we’re immensely grateful for their contributions. Likewise, deprivateR depends on Kyle Walker’s tidycensus for access to U.S. Census Bureau data.