README.md

ndi: Neighborhood Deprivation Indices

R-CMD-check CRAN status CRAN version CRAN RStudio mirror downloads total CRAN RStudio mirror downloads monthly License GitHub last commit DOI

Date repository last updated: January 23, 2024

Overview

The ndi package is a suite of R functions to compute various metrics of socio-economic deprivation and disparity in the United States. Some metrics are considered "spatial" because they consider the values of neighboring (i.e., adjacent) census geographies in their computation, while other metrics are "aspatial" because they only consider the value within each census geography. Two types of aspatial NDI are available: (1) based on Messer et al. (2006) and (2) based on Andrews et al. (2020) and Slotman et al. (2022) who use variables chosen by Roux and Mair (2010). Both are a decomposition of various demographic characteristics from the U.S. Census Bureau American Community Survey 5-year estimates (ACS-5; 2006-2010 onward) pulled by the tidycensus package. Using data from the ACS-5 (2005-2009 onward), the ndi package can also compute the (1) spatial Racial Isolation Index (RI) based on Anthopolos et al. (2011), (2) spatial Educational Isolation Index (EI) based on Bravo et al. (2021), (3) aspatial Index of Concentration at the Extremes (ICE) based on Feldman et al. (2015) and Krieger et al. (2016), (4) aspatial racial/ethnic Dissimilarity Index (DI) based on Duncan & Duncan (1955), (5) aspatial income or racial/ethnic Atkinson Index (DI) based on Atkinson (1970), (6) aspatial racial/ethnic Isolation Index (II) based on Shevky & Williams (1949; ISBN-13:978-0-837-15637-8) and Bell (1954), (7) aspatial racial/ethnic Correlation Ratio based on Bell (1954) and White (1986), (8) aspatial racial/ethnic Location Quotient based on Merton (1939) and Sudano et al. (2013), and (9) aspatial racial/ethnic Local Exposure and Isolation metric based on Bemanian & Beyer (2017). Also using data from the ACS-5 (2005-2009 onward), the ndi package can retrieve the aspatial Gini Index based on Gini (1921).

Installation

To install the release version from CRAN:

install.packages("ndi")

To install the development version from GitHub:

devtools::install_github("idblr/ndi")

Available functions

Function Description anthopolos Compute the spatial Racial Isolation Index (RI) based on Anthopolos _et al._ (2011) atkinson Compute the aspatial Atkinson Index (AI) based on Atkinson (1970) bell Compute the aspatial racial/ethnic Isolation Index (II) based on Shevky & Williams (1949; ISBN-13:978-0-837-15637-8) and Bell (1954) bemanian_beyer Compute the aspatial racial/ethnic Local Exposure and Isolation (LEx/Is) metric based on Bemanian & Beyer (2017) bravo Compute the spatial Educational Isolation Index (EI) based on Bravo _et al._ (2021) duncan Compute the aspatial racial/ethnic Dissimilarity Index (DI) based on Duncan & Duncan (1955) gini Retrieve the aspatial Gini Index based on Gini (1921) krieger Compute the aspatial Index of Concentration at the Extremes (ICE) based on Feldman _et al._ (2015) and Krieger _et al._ (2016) messer Compute the aspatial Neighborhood Deprivation Index (NDI) based on Messer _et al._ (2006) powell_wiley Compute the aspatial Neighborhood Deprivation Index (NDI) based on Andrews _et al._ (2020) and Slotman _et al._ (2022) with variables chosen by Roux and Mair (2010) sudano Compute the aspatial racial/ethnic Location Quotient (LQ) based on Merton (1938) and Sudano _et al._ (2013) white Compute the aspatial racial/ethnic Correlation Ratio (V) based on Bell (1954) and White (1986) The repository also includes the code to create the project hexagon sticker.

### Available sample dataset

Data Description DCtracts2020 A sample data set containing information about U.S. Census American Community Survey 5-year estimate data for the District of Columbia census tracts (2020). The data are obtained from the tidycensus package and formatted for the messer() and powell_wiley() functions input. ### Author * **Ian D. Buller** - *Social & Scientific Systems, Inc., a division of DLH Corporation, Silver Spring, Maryland (current)* - *Occupational and Environmental Epidemiology Branch, Division of Cancer Epidemiology and Genetics, National Cancer Institute, National Institutes of Health, Rockville, Maryland (original)* - [GitHub](https://github.com/idblr) - [ORCID](https://orcid.org/0000-0001-9477-8582) See also the list of [contributors](https://github.com/idblr/ndi/graphs/contributors) who participated in this package, including: * **Jacob Englert** - *Biostatistics and Bioinformatics Doctoral Program, Laney Graduate School, Emory University, Atlanta, Georgia* - [GitHub](https://github.com/jacobenglert) * **Chris Prener** - *Real World Evidence Center of Excellence, Pfizer, Inc.* - [GitHub](https://github.com/chris-prener) - [ORCID](https://orcid.org/0000-0002-4310-9888) * **Jessica Gleason** - *Epidemiology Branch, Division of Population Health Research, Eunice Kennedy Shriver National Institute of Child Health and Human Development, National Institutes of Health, Bethesda, Maryland* - [ORCID](https://orcid.org/0000-0001-9877-7931) Thank you to those who suggested additional metrics, including: * **Jessica Madrigal** - *Occupational and Environmental Epidemiology Branch, Division of Cancer Epidemiology and Genetics, National Cancer Institute, National Institutes of Health, Rockville, Maryland* - [ORCID](https://orcid.org/0000-0001-5303-5109) * **David Berrigan** - *Behavioral Research Program, Division of Cancer Control and Population Sciences, National Cancer Institute, National Institutes of Health, Rockville, Maryland* - [ORCID](https://orcid.org/0000-0002-5333-179X) ### Getting Started * Step 1: Obtain a unique access key from the U.S. Census Bureau. Follow [this link](http://api.census.gov/data/key_signup.html) to obtain one. * Step 2: Specify your access key in the `anthopolos()`, `atkinson()`, `bell()`, `bemanian_beyer()`, `bravo()`, `duncan()`, `gini()`, `krieger()`, `messer()`, `powell_wiley()`, `sudano()`, or `white()` functions using the internal `key` argument or by using the `census_api_key()` function from the `tidycensus` package before running the `anthopolos()`, `atkinson()`, `bell()`, `bemanian_beyer()`, `bravo()`, `duncan()`, `gini()`, `krieger()`, `messer()`, `powell_wiley()`, `sudano()`, or `white()` functions (see an example below). ### Usage wzxhzdk:0 ![](man/figures/messer1.png) ![](man/figures/messer2.png) wzxhzdk:1 ![](man/figures/powell_wiley1.png) ![](man/figures/powell_wiley2.png) wzxhzdk:2 ![](man/figures/powell_wiley3.png) ![](man/figures/powell_wiley4.png) wzxhzdk:3 wzxhzdk:4 ![](man/figures/gini.png) wzxhzdk:5 ![](man/figures/ri.png) wzxhzdk:6 ![](man/figures/ei.png) wzxhzdk:7 ![](man/figures/ice1.png) wzxhzdk:8 ![](man/figures/ice2.png) wzxhzdk:9 ![](man/figures/ice3.png) wzxhzdk:10 ![](man/figures/ice4.png) wzxhzdk:11 ![](man/figures/ice5.png) wzxhzdk:12 ![](man/figures/di.png) wzxhzdk:13 ![](man/figures/ai.png) wzxhzdk:14 ![](man/figures/ii.png) wzxhzdk:15 ![](man/figures/v.png) wzxhzdk:16 ![](man/figures/lq.png) wzxhzdk:17 ![](man/figures/lexis.png) ### Funding This package was originally developed while the author was a postdoctoral fellow supported by the [Cancer Prevention Fellowship Program](https://cpfp.cancer.gov) at the [National Cancer Institute](https://www.cancer.gov). Any modifications since December 05, 2022 were made while the author was an employee of Social & Scientific Systems, Inc., a division of [DLH Corporation](https://www.dlhcorp.com). ### Acknowledgments The `messer()` function functionalizes the code found in [Hruska _et al._ (2022)](https://doi.org/10.1016/j.janxdis.2022.102529) available on an [OSF repository](https://doi.org/10.17605/OSF.IO/M2SAV), but with percent with income less than $30K added to the computation based on [Messer _et al._ (2006)](https://doi.org/10.1007/s11524-006-9094-x). The `messer()` function also allows for the computation of NDI (Messer) for each year between 2010-2020 (when the U.S. census characteristics are available to date). There was no code companion to compute NDI (Powell-Wiley) included in [Andrews _et al._ (2020)](https://doi.org/10.1080/17445647.2020.1750066) or [Slotman _et al._ (2022)](https://doi.org/10.1016/j.dib.2022.108002), but the package author worked directly with the latter manuscript authors to replicate their `SAS` code in `R` for the `powell_wiley()` function. Please note: the NDI (Powell-Wiley) values will not exactly match (but will highly correlate with) those found in [Andrews _et al._ (2020)](https://doi.org/10.1080/17445647.2020.1750066) and [Slotman _et al._ (2022)](https://doi.org/10.1016/j.dib.2022.108002) because the two studies used a different statistical platform (i.e., `SPSS` and `SAS`, respectively) that intrinsically calculate the principal component analysis differently from `R`. The internal function to calculate the Atkinson Index is based on the `Atkinson()` function in the [DescTools](https://cran.r-project.org/package=DescTools) package. When citing this package for publication, please follow: citation("ndi") ### Questions? Feedback? For questions about the package, please contact the maintainer [Dr. Ian D. Buller](mailto:ian.buller@alumni.emory.edu) or [submit a new issue](https://github.com/idblr/ndi/issues). Confirmation of the computation, feedback, and feature collaboration is welcomed, especially from the authors of the references cited above.

Try the ndi package in your browser

Any scripts or data that you put into this service are public.

ndi documentation built on May 29, 2024, 9:56 a.m.