diff --git a/DESCRIPTION b/DESCRIPTION index d2b3c3d..bb48bc4 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,16 +1,16 @@ Package: ndi Title: Neighborhood Deprivation Indices -Version: 0.1.3.9000 -Date: 2022-11-03 +Version: 0.1.3 +Date: 2022-12-01 Authors@R: c(person(given = "Ian D.", family = "Buller", role = c("aut", "cre", "cph"), - email = "ian.buller@nih.gov", + email = "ian.buller@alumni.emory.edu", comment = c(ORCID = "0000-0001-9477-8582")), person(given = "NCI", role = c("cph", "fnd"))) -Maintainer: Ian D. Buller +Maintainer: Ian D. Buller Description: Computes 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 @@ -23,8 +23,8 @@ Description: Computes various metrics of socio-economic deprivation and disparit who use variables chosen by Roux and Mair (2010) . Both are a decomposition of multiple demographic characteristics from the U.S. Census Bureau - American Community Survey 5-year estimates (ACS-5; 2010 onward). Using data - from the ACS-5 (2009 onward), the package can also (1) compute the spatial + American Community Survey 5-year estimates (ACS-5; 2006-2010 onward). Using data + from the ACS-5 (2005-2009 onward), the package can also (1) compute the spatial Racial Isolation Index (RI) based on Anthopolos et al. (2011) , (2) compute the spatial Educational Isolation Index (EI) based on Bravo et al. (2021) , diff --git a/NEWS.md b/NEWS.md index 49e6fee..94e7254 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,6 @@ # ndi (development version) -# ndi v0.1.3.9000 +# ndi v0.1.3 ### New Features * Added `duncan()` function to compute the Dissimilarity Index (DI) based on [Duncan & Duncan (1955)](https://doi.org/10.2307/2088328) for specified counties/tracts 2009 onward. @@ -15,6 +15,7 @@ * Updated Description in DESCRIPTION * Updated tests * Updated CITATION with new citation for the additional metric +* Updated maintainer contact information # ndi v0.1.2 diff --git a/R/duncan.R b/R/duncan.R index 201e86f..d62dbbd 100644 --- a/R/duncan.R +++ b/R/duncan.R @@ -178,7 +178,6 @@ duncan <- function(geo_large = "county", geo_small = "tract", year = 2020, subgr # Compute DI ## From Duncan & Duncan (1955) https://doi.org/10.2307/2088328 - ## SIMPLIFIED ## D_{jt} = 1/2 \sum_{i=1}^{k} | \frac{x_{ijt}}{X_{jt}}-\frac{y_{ijt}}{Y_{jt}}| ## Where for k smaller geographies: ## D_{jt} denotes the DI of larger geography j at time t diff --git a/R/package.R b/R/package.R index c93011e..0c57563 100644 --- a/R/package.R +++ b/R/package.R @@ -2,7 +2,7 @@ #' #' Computes various metrics of socio-economic deprivation and disparity in the United States based on information available from the U.S. Census Bureau. #' -#' @details The 'ndi' package computes 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 neighborhood deprivation indices (NDI) are available: (1) based on Messer et al. (2006) \doi{10.1007/s11524-006-9094-x} and (2) based on Andrews et al. (2020) \doi{10.1080/17445647.2020.1750066} and Slotman et al. (2022) \doi{10.1016/j.dib.2022.108002} who use variables chosen by Roux and Mair (2010) \doi{10.1111/j.1749-6632.2009.05333.x}. Both are a decomposition of multiple demographic characteristics from the U.S. Census Bureau American Community Survey 5-year estimates (ACS-5; 2010 onward). Using data from the ACS-5 (2009 onward), the package can also (1) compute the spatial Racial Isolation Index (RI) based on Anthopolos et al. (2011) \doi{10.1016/j.sste.2011.06.002}, (2) compute the spatial Educational Isolation Index (EI) based on Bravo et al. (2021) \doi{10.3390/ijerph18179384}, (3) compute the aspatial Index of Concentration at the Extremes (ICE) based on Feldman et al. (2015) \doi{10.1136/jech-2015-205728} and Krieger et al. (2016) \doi{10.2105/AJPH.2015.302955}, (4) compute the aspatial Dissimilarity Index based on Duncan & Duncan (1955) \doi{10.2307/2088328}, and (5) retrieve the aspatial Gini Index based on Gini (1921) \doi{10.2307/2223319}. +#' @details The 'ndi' package computes 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 neighborhood deprivation indices (NDI) are available: (1) based on Messer et al. (2006) \doi{10.1007/s11524-006-9094-x} and (2) based on Andrews et al. (2020) \doi{10.1080/17445647.2020.1750066} and Slotman et al. (2022) \doi{10.1016/j.dib.2022.108002} who use variables chosen by Roux and Mair (2010) \doi{10.1111/j.1749-6632.2009.05333.x}. Both are a decomposition of multiple demographic characteristics from the U.S. Census Bureau American Community Survey 5-year estimates (ACS-5; 2006-2010 onward). Using data from the ACS-5 (2005-2009 onward), the package can also (1) compute the spatial Racial Isolation Index (RI) based on Anthopolos et al. (2011) \doi{10.1016/j.sste.2011.06.002}, (2) compute the spatial Educational Isolation Index (EI) based on Bravo et al. (2021) \doi{10.3390/ijerph18179384}, (3) compute the aspatial Index of Concentration at the Extremes (ICE) based on Feldman et al. (2015) \doi{10.1136/jech-2015-205728} and Krieger et al. (2016) \doi{10.2105/AJPH.2015.302955}, (4) compute the aspatial Dissimilarity Index based on Duncan & Duncan (1955) \doi{10.2307/2088328}, and (5) retrieve the aspatial Gini Index based on Gini (1921) \doi{10.2307/2223319}. #' #' Key content of the 'ndi' package include:\cr #' @@ -12,10 +12,10 @@ #' #' \code{\link{bravo}} Computes the spatial Educational Isolation Index (EI) based on Bravo (2021) \doi{10.3390/ijerph18179384}. #' -#' \code{\link{gini}} Retrieves the aspatial Gini Index based on Gini (1921) \doi{10.2307/2223319}. -#' #' \code{\link{duncan}} Computes the aspatial Dissimilarity Index based on Duncan & Duncan (1955) \doi{10.2307/2088328}. #' +#' \code{\link{gini}} Retrieves the aspatial Gini Index based on Gini (1921) \doi{10.2307/2223319}. +#' #' \code{\link{krieger}} Computes the aspatial Index of Concentration at the Extremes based on Feldman et al. (2015) \doi{10.1136/jech-2015-205728} and Krieger et al. (2016) \doi{10.2105/AJPH.2015.302955}. #' #' \code{\link{messer}} Computes the aspatial Neighborhood Deprivation Index (NDI) based on Messer et al. (2006) \doi{10.1007/s11524-006-9094-x}. @@ -34,7 +34,7 @@ #' #' @author Ian D. Buller\cr \emph{Occupational and Environmental Epidemiology Branch, Division of Cancer Epidemiology and Genetics, National Cancer Institute, National Institutes of Health, Rockville, Maryland, USA.} \cr #' -#' Maintainer: I.D.B. \email{ian.buller@@nih.gov} +#' Maintainer: I.D.B. \email{ian.buller@@alumni.emory.edu} #' #' @keywords package NULL diff --git a/README.md b/README.md index 4b7b971..f6966ba 100644 --- a/README.md +++ b/README.md @@ -10,11 +10,11 @@ ndi: Neighborhood Deprivation Indices -**Date repository last updated**: November 03, 2022 +**Date repository last updated**: December 01, 2022 ### 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)](https://doi.org/10.1007/s11524-006-9094-x) and (2) based on [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) who use variables chosen by [Roux and Mair (2010)](https://doi.org/10.1111/j.1749-6632.2009.05333.x). Both are a decomposition of various demographic characteristics from the U.S. Census Bureau American Community Survey 5-year estimates (ACS-5; 2010 onward) pulled by the [tidycensus](https://CRAN.R-project.org/package=tidycensus) package. Using data from the ACS-5 (2009 onward), the `ndi` package can also (1) compute the spatial Racial Isolation Index (RI) based on [Anthopolos et al. (2011)](https://www.doi.org/10.1016/j.sste.2011.06.002), (2) compute the spatial Educational Isolation Index (EI) based on [Bravo et al. (2021)](https://www.doi.org/10.3390/ijerph18179384), (3) compute the aspatial Index of Concentration at the Extremes (ICE) based on [Feldman et al. (2015)](https://www.doi.org/10.1136/jech-2015-205728) and [Krieger et al. (2016)](https://www.doi.org/10.2105/AJPH.2015.302955), (4) compute the aspatial Dissimilarity Index (DI) based on [Duncan & Duncan (1955)](https://doi.org/10.2307/2088328), and (5) retrieve the aspatial Gini Index based on [Gini (1921)](https://www.doi.org/10.2307/2223319). +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)](https://doi.org/10.1007/s11524-006-9094-x) and (2) based on [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) who use variables chosen by [Roux and Mair (2010)](https://doi.org/10.1111/j.1749-6632.2009.05333.x). 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](https://CRAN.R-project.org/package=tidycensus) package. Using data from the ACS-5 (2005-2009 onward), the `ndi` package can also (1) compute the spatial Racial Isolation Index (RI) based on [Anthopolos et al. (2011)](https://www.doi.org/10.1016/j.sste.2011.06.002), (2) compute the spatial Educational Isolation Index (EI) based on [Bravo et al. (2021)](https://www.doi.org/10.3390/ijerph18179384), (3) compute the aspatial Index of Concentration at the Extremes (ICE) based on [Feldman et al. (2015)](https://www.doi.org/10.1136/jech-2015-205728) and [Krieger et al. (2016)](https://www.doi.org/10.2105/AJPH.2015.302955), (4) compute the aspatial Dissimilarity Index (DI) based on [Duncan & Duncan (1955)](https://doi.org/10.2307/2088328), and (5) retrieve the aspatial Gini Index based on [Gini (1921)](https://www.doi.org/10.2307/2223319). ### Installation @@ -46,15 +46,15 @@ To install the development version from GitHub: bravo Compute the Educational Isolation Index (EI) based on Bravo et al. (2021) +duncan +Compute the Dissimilarity Index (DI) based on Duncan & Duncan (1955) + gini Retrieve the Gini Index based on Gini (1921) krieger Compute the Index of Concentration at the Extremes (ICE) based on Feldman et al. (2015) and Krieger et al. (2016) -duncan -Compute the Dissimilarity Index (DI) based on Duncan & Duncan (1955) - messer Compute the Neighboorhood Deprivation Index (NDI) based on Messer et al. (2006) @@ -504,9 +504,9 @@ ggplot2::ggplot() + ![](man/figures/ice5.png) ```r -# --------------------------------------------- # +# ------------------------------------ # # Compute Dissimilarity Index (Duncan) # -# --------------------------------------------- # +# ------------------------------------ # # Dissimilarity Index based on Duncan & Duncan (1955) ## Selected subgroup comparison: Not Hispanic or Latino, Black or African American alone @@ -551,4 +551,4 @@ When citing this package for publication, please follow: ### Questions? Feedback? -For questions about the package, please contact the maintainer [Dr. Ian D. Buller](mailto:ian.buller@nih.gov) 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. +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. diff --git a/cran-comments.md b/cran-comments.md index bd02bd7..fcb4272 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -9,6 +9,7 @@ * Updated Description in DESCRIPTION * Updated tests * Updated CITATION with new citation for the additional metric + * Updated maintainer contact information * Documentation for DESCRIPTION, README, NEWS, and vignette references the following DOIs, which throws a NOTE but are a valid URL: * diff --git a/inst/CITATION b/inst/CITATION index 48957c3..de736ef 100755 --- a/inst/CITATION +++ b/inst/CITATION @@ -5,7 +5,7 @@ citEntry(entry = "manual", author = personList(as.person("Ian D. Buller")), publisher = "The Comprehensive R Archive Network", year = "2022", - number = "0.1.3.9000", + number = "0.1.3", doi = "10.5281/zenodo.6989030", url = "https://cran.r-project.org/package=ndi", @@ -13,7 +13,7 @@ citEntry(entry = "manual", paste("Ian D. Buller (2022).", "ndi: Neighborhood Deprivation Indices.", "The Comprehensive R Archive Network.", - "v0.1.3.9000.", + "v0.1.3.", "DOI:10.5281/zenodo.6989030", "Accessed by: https://cran.r-project.org/package=ndi") ) diff --git a/man/duncan.Rd b/man/duncan.Rd index 1e4e55b..e692ecf 100644 --- a/man/duncan.Rd +++ b/man/duncan.Rd @@ -39,7 +39,7 @@ An object of class 'list'. This is a named list with the following components: } } \description{ -Compute the Dissimilarity Index (Duncan & Duncan) values for a selected subgroup(s) and U.S. geographies +Compute the Dissimilarity Index (Duncan) values for a selected subgroup(s) and U.S. geographies } \details{ This function will compute the Dissimilarity Index (DI) of selected racial/ethnic subgroups and U.S. geographies for a specified geographical extent (e.g., the entire U.S. or a single state) based on Duncan & Duncan (1955) \doi{10.2307/2088328}. This function provides the computation of DI for any of the U.S. Census Bureau race/ethnicity subgroups (including Hispanic and non-Hispanic individuals). diff --git a/man/ndi-package.Rd b/man/ndi-package.Rd index d3ad263..927c4ae 100644 --- a/man/ndi-package.Rd +++ b/man/ndi-package.Rd @@ -9,7 +9,7 @@ Computes various metrics of socio-economic deprivation and disparity in the United States based on information available from the U.S. Census Bureau. } \details{ -The 'ndi' package computes 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 neighborhood deprivation indices (NDI) are available: (1) based on Messer et al. (2006) \doi{10.1007/s11524-006-9094-x} and (2) based on Andrews et al. (2020) \doi{10.1080/17445647.2020.1750066} and Slotman et al. (2022) \doi{10.1016/j.dib.2022.108002} who use variables chosen by Roux and Mair (2010) \doi{10.1111/j.1749-6632.2009.05333.x}. Both are a decomposition of multiple demographic characteristics from the U.S. Census Bureau American Community Survey 5-year estimates (ACS-5; 2010 onward). Using data from the ACS-5 (2009 onward), the package can also (1) compute the spatial Racial Isolation Index (RI) based on Anthopolos et al. (2011) \doi{10.1016/j.sste.2011.06.002}, (2) compute the spatial Educational Isolation Index (EI) based on Bravo et al. (2021) \doi{10.3390/ijerph18179384}, (3) compute the aspatial Index of Concentration at the Extremes (ICE) based on Feldman et al. (2015) \doi{10.1136/jech-2015-205728} and Krieger et al. (2016) \doi{10.2105/AJPH.2015.302955}, (4) compute the aspatial Dissimilarity Index based on Duncan & Duncan (1955) \doi{10.2307/2088328}, and (5) retrieve the aspatial Gini Index based on Gini (1921) \doi{10.2307/2223319}. +The 'ndi' package computes 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 neighborhood deprivation indices (NDI) are available: (1) based on Messer et al. (2006) \doi{10.1007/s11524-006-9094-x} and (2) based on Andrews et al. (2020) \doi{10.1080/17445647.2020.1750066} and Slotman et al. (2022) \doi{10.1016/j.dib.2022.108002} who use variables chosen by Roux and Mair (2010) \doi{10.1111/j.1749-6632.2009.05333.x}. Both are a decomposition of multiple demographic characteristics from the U.S. Census Bureau American Community Survey 5-year estimates (ACS-5; 2006-2010 onward). Using data from the ACS-5 (2005-2009 onward), the package can also (1) compute the spatial Racial Isolation Index (RI) based on Anthopolos et al. (2011) \doi{10.1016/j.sste.2011.06.002}, (2) compute the spatial Educational Isolation Index (EI) based on Bravo et al. (2021) \doi{10.3390/ijerph18179384}, (3) compute the aspatial Index of Concentration at the Extremes (ICE) based on Feldman et al. (2015) \doi{10.1136/jech-2015-205728} and Krieger et al. (2016) \doi{10.2105/AJPH.2015.302955}, (4) compute the aspatial Dissimilarity Index based on Duncan & Duncan (1955) \doi{10.2307/2088328}, and (5) retrieve the aspatial Gini Index based on Gini (1921) \doi{10.2307/2223319}. Key content of the 'ndi' package include:\cr @@ -19,10 +19,10 @@ Key content of the 'ndi' package include:\cr \code{\link{bravo}} Computes the spatial Educational Isolation Index (EI) based on Bravo (2021) \doi{10.3390/ijerph18179384}. -\code{\link{gini}} Retrieves the aspatial Gini Index based on Gini (1921) \doi{10.2307/2223319}. - \code{\link{duncan}} Computes the aspatial Dissimilarity Index based on Duncan & Duncan (1955) \doi{10.2307/2088328}. +\code{\link{gini}} Retrieves the aspatial Gini Index based on Gini (1921) \doi{10.2307/2223319}. + \code{\link{krieger}} Computes the aspatial Index of Concentration at the Extremes based on Feldman et al. (2015) \doi{10.1136/jech-2015-205728} and Krieger et al. (2016) \doi{10.2105/AJPH.2015.302955}. \code{\link{messer}} Computes the aspatial Neighborhood Deprivation Index (NDI) based on Messer et al. (2006) \doi{10.1007/s11524-006-9094-x}. @@ -40,6 +40,6 @@ Key content of the 'ndi' package include:\cr \author{ Ian D. Buller\cr \emph{Occupational and Environmental Epidemiology Branch, Division of Cancer Epidemiology and Genetics, National Cancer Institute, National Institutes of Health, Rockville, Maryland, USA.} \cr -Maintainer: I.D.B. \email{ian.buller@nih.gov} +Maintainer: I.D.B. \email{ian.buller@alumni.emory.edu} } \keyword{package} diff --git a/tests/testthat/test-gini.R b/tests/testthat/test-gini.R index 2116ac2..78cac87 100644 --- a/tests/testthat/test-gini.R +++ b/tests/testthat/test-gini.R @@ -1,7 +1,7 @@ context("gini") ################### -# gin i testthat # +# gini testthat # ################### test_that("gini throws error with invalid arguments", {