Skip to content

Commit

Permalink
🔀 Merge branch:dev_duncan_cuzzort into branch:main (#24)
Browse files Browse the repository at this point in the history
* ✨ Initial commit for branch "dev_duncan_cuzzort" (ndi v0.1.6.9007)

* Added `geo_large = 'place'` for census-designated places as the larger geographical unit in `atkinson()`, `bell()`, `bemanian_beyer()`, `duncan()`, `hoover()`, `james_taeuber()`, `lieberson()`, `sudano()`, `theil()`, and `white()`, `white_blau()` functions.
* Specifying census block groups in `geo` or `geo_small` arguments is now `'block group'` or `'cbg'` to match internal `get_acs()` function from the [tidycensus](https://CRAN.R-project.org/package=tidycensus) package
* Added census block group computation for `anthopolos()` by specifying `geo == 'cbg'` or `geo == 'block group'`

* 🔨 Added `duncan_cuzzort()` function

 * Added `duncan_cuzzort()` function to compute the aspatial racial or ethnic Absolute Centralization (*ACE*) based on Duncan, Cuzzort, & Duncan (1961; LC:60007089) and [Massey & Denton (1988)](https://doi.org/10.1093/sf/67.2.281)
* Added census block group computation for `anthopolos()` by specifying `geo == 'cbg'` or `geo == 'block group'`
  * Fixed bug in `atkinson()` function to properly compute the income Atkinson Index
* Updated and reordered the contents of 'ndi-package.R'
* Consolidated DESCRIPTION
* Reordered the README examples alphabetically

* 🧱 Split up vignette into three separate vignettes

* Split up vignette into three separate vignettes: 'ndi1', 'ndi2', and 'ndi3' for the *NDI*, racial or ethnic residential segregation, and additional socioeconomic disparity indices, respectively
  • Loading branch information
idblr authored Aug 29, 2024
1 parent ddbac71 commit 3489d8f
Show file tree
Hide file tree
Showing 58 changed files with 9,455 additions and 8,884 deletions.
44 changes: 9 additions & 35 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: ndi
Title: Neighborhood Deprivation Indices
Version: 0.1.6.9006
Date: 2024-08-24
Version: 0.1.6.9007
Date: 2024-08-29
Authors@R:
c(person(given = "Ian D.",
family = "Buller",
Expand All @@ -11,10 +11,10 @@ Authors@R:
person(given = "NCI",
role = c("cph", "fnd")))
Maintainer: Ian D. Buller <[email protected]>
Description: Computes various metrics of socio-economic deprivation and disparity in
the United States. Some metrics are considered "spatial" because they
Description: Computes various indices of socioeconomic deprivation and disparity in
the United States. Some indices 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
their computation, while other indices are "aspatial" because they only
consider the value within each census geography. Two types of aspatial
neighborhood deprivation indices (NDI) are available: including:
(1) based on Messer et al. (2006) <doi:10.1007/s11524-006-9094-x>
Expand All @@ -24,36 +24,10 @@ Description: Computes various metrics of socio-economic deprivation and disparit
<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 racial or ethnic
Dissimilarity Index (D) based on Duncan & Duncan (1955) <doi:10.2307/2088328>, (5)
compute the aspatial income or racial or ethnic Atkinson Index (A) based on Atkinson
(1970) <doi:10.1016/0022-0531(70)90039-6>, (6) aspatial racial or ethnic Interaction
Index (xPy*) based on Shevky & Williams (1949; ISBN-13:978-0-837-15637-8) and Bell
(1954) <doi:10.2307/2574118>, (7) aspatial racial or ethnic Correlation Ratio (V)
based on Bell (1954) <doi:10.2307/2574118> and White (1986) <doi:10.2307/3644339>,
(8) aspatial racial or ethnic Location Quotient (LQ) based on Merton (1939)
<doi:10.2307/2084686> and Sudano et al. (2013)
<doi:10.1016/j.healthplace.2012.09.015>, (9) aspatial racial or ethnic Local
Exposure and Isolation (LEx/Is) metric based on Bemanian & Beyer (2017)
<doi:10.1158/1055-9965.EPI-16-0926>, (10) aspatial racial or ethnic Delta (DEL)
based on Hoover (1941) <doi:10.1017/S0022050700052980> and Duncan et al. (1961;
LC:60007089), (11) an index of spatial proximity (SP) based on White (1986)
<doi:10.2307/3644339> and Blau (1977; ISBN-13:978-0-029-03660-0), (12) the
aspatial racial or ethnic Isolation Index (xPx*) based on Lieberson (1981;
ISBN-13:978-1-032-53884-6) and Bell (1954) <doi:10.2307/2574118>, (13) the
aspatial racial or ethnic Gini Index (G) based Gini (1921) <doi:10.2307/2223319>,
(14) the aspatial racial or ethnic Dissimilarity Index (D) based on James &
Taeuber (1985) <doi:10.2307/270845>, and (15) the aspatial racial or ethnic
Entropy (H) based on Theil (1972; ISBN-13:978-0-444-10378-9) and Theil & Finizza
(1971) <doi:110.1080/0022250X.1971.9989795>. Also using data from the ACS-5 (2005-2009
onward), the package can retrieve the aspatial income Gini Index (G) based on
Gini (1921) <doi:10.2307/2223319>.
(2005-2009 onward), the package can also compute indices of racial or ethnic
residential segregation, including but limited to those discussed in Massey
& Denton (1988) <doi:10.1093/sf/67.2.281>, and additional indices of
socioeconomic disparity.
License: Apache License (>= 2.0)
Encoding: UTF-8
LazyData: true
Expand Down
6 changes: 6 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export(bell)
export(bemanian_beyer)
export(bravo)
export(duncan)
export(duncan_cuzzort)
export(gini)
export(hoover)
export(james_taeuber)
Expand All @@ -28,6 +29,7 @@ importFrom(sf,st_distance)
importFrom(sf,st_drop_geometry)
importFrom(sf,st_geometry)
importFrom(sf,st_intersects)
importFrom(sf,st_transform)
importFrom(sf,st_within)
importFrom(stats,complete.cases)
importFrom(stats,cor)
Expand All @@ -45,7 +47,11 @@ importFrom(tidyr,pivot_longer)
importFrom(tidyr,separate)
importFrom(tigris,combined_statistical_areas)
importFrom(tigris,core_based_statistical_areas)
importFrom(tigris,counties)
importFrom(tigris,metro_divisions)
importFrom(tigris,places)
importFrom(tigris,states)
importFrom(tigris,tracts)
importFrom(units,drop_units)
importFrom(units,set_units)
importFrom(utils,stack)
29 changes: 19 additions & 10 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,40 @@
# ndi (development version)

## ndi v0.1.6.9006
## ndi v0.1.6.9007

### New Features
* Added `hoover()` function to compute the aspatial racial or ethnic Delta (*DEL*) based on [Hoover (1941)](https://doi.org/10.1017/S0022050700052980) and Duncan et al. (1961; LC:60007089)
* Added `white_blau()` function to compute an index of spatial proximity (*SP*) based on [White (1986)](https://doi.org/10.2307/3644339) and Blau (1977; ISBN-13:978-0-029-03660-0)
* Added `lieberson()` function to compute the aspatial racial or ethnic Isolation Index (_xPx\*_) based on Lieberson (1981; ISBN-13:978-1-032-53884-6) and and [Bell (1954)](https://doi.org/10.2307/2574118)
* Added `duncan_cuzzort()` function to compute the aspatial racial or ethnic Absolute Centralization (*ACE*) based on Duncan, Cuzzort, & Duncan (1961; LC:60007089) and [Massey & Denton (1988)](https://doi.org/10.1093/sf/67.2.281)
* Added `hoover()` function to compute the aspatial racial or ethnic Delta (*DEL*) based on [Hoover (1941)](https://doi.org/10.1017/S0022050700052980) and Duncan, Cuzzort, & Duncan (1961; LC:60007089)
* Added `james_taeuber()` function to compute the aspatial racial or ethnic Dissimilarity Index (*D*) based on [James & Taeuber (1985)](https://doi.org/10.2307/270845)
* Added `lieberson()` function to compute the aspatial racial or ethnic Isolation Index (_xPx\*_) based on Lieberson (1981; ISBN-13:978-1-032-53884-6) and and [Bell (1954)](https://doi.org/10.2307/2574118)
* Added `theil()` function the aspatial racial or ethnic Entropy (*H*) based on Theil (1972; ISBN:978-0-444-10378-9) and [Theil & Finizza (1971)](https://doi.org/110.1080/0022250X.1971.9989795)
* Added `geo_large = 'cbsa'` for Core Based Statistical Areas, `geo_large = 'csa'` for Combined Statistical Areas, and `geo_large = 'metro'` for Metropolitan Divisions as the larger geographical unit in `atkinson()`, `bell()`, `bemanian_beyer()`, `duncan()`, `hoover()`, `lieberson()`, `sudano()`, and `white()`, `white_blau()` functions.
* Added `white_blau()` function to compute an index of spatial proximity (*SP*) based on [White (1986)](https://doi.org/10.2307/3644339) and Blau (1977; ISBN-13:978-0-029-03660-0)
* Thank you for the feature suggestions, [Symielle Gaston](https://orcid.org/0000-0001-9495-1592)
* Added `geo_large = 'place'` for census-designated places, `geo_large = 'cbsa'` for core-based statistical areas, `geo_large = 'csa'` for combined statistical areas, and `geo_large = 'metro'` for metropolitan divisions as the larger geographical unit in `atkinson()`, `bell()`, `bemanian_beyer()`, `duncan()`, `duncan_cuzzort()`, `hoover()`, `james_taeuber()`, `lieberson()`, `sudano()`, `theil()`, and `white()`, `white_blau()` functions.
* Added census block group computation for `anthopolos()` by specifying `geo == 'cbg'` or `geo == 'block group'`
* Added `holder` argument to `atkinson()` function to toggle the computation with or without the Hölder mean. The function can now compute *A* without the Hölder mean. The default is `holder = FALSE`.
* Added `crs` argument to `anthopolos()`, `bravo()`, and `white_blau()` functions to provide spatial projection of the distance-based metrics
* The `gini()` function now computes the aspatial racial or ethnic Gini Index (*G*) based on [Gini (1921)](https://doi.org/10.2307/2223319) as the main outcome. Arguments `geo_large`, `geo_small`, `subgroup`, and `omit_NAs` were added and argument `geo` was deprecated. The `gini()` function still retrieves the original output of the aspatial income Gini Index (*G*) at each smaller geography and is moved from the `g` output to `g_data` output.
* Specifying census block groups in `geo` or `geo_small` arguments is now `'block group'` or `'cbg'` to match internal `get_acs()` function from the [tidycensus](https://CRAN.R-project.org/package=tidycensus) package

### Updates
* `bell()` function computes the Interaction Index (Bell) not the Isolation Index as previously documented. Updated documentation throughout
* `bell()` function computes the Interaction Index (Bell) not the Isolation Index as previously documented. Updated documentation throughout.
* Fixed bug in `bell()`, `bemanian_beyer()`, `duncan()`, `sudano()`, and `white()` functions when a smaller geography contains n=0 total population, will assign a value of zero (0) in the internal calculation instead of NA
* Fixed bug in `atkinson()` function to properly compute the income Atkinson Index
* Renamed *AI* as *A*, *DI* as *D*, *Gini* as *G*, and *II* as _xPy\*_ to align with the definitions from [Massey & Denton (1988)](https://doi.org/10.1093/sf/67.2.281). The output for `atkinson()` now produces `a` instead of `ai`. The output for `duncan()` now produces `d` instead of `ai`. The output for `gini()` now produces `g` instead of `gini`. The output for `bell()` now produces `xPy_star` instead of `II`. The internal functions `ai_fun()`, `di_fun()` and `ii_fun()` were renamed `a_fun()`, `ddd_fun()` and `xpy_star_fun()`, respectively.
* `tigris` and `units` are now Imports
* 'package.R' deprecated. Replaced with 'ndi-package.R'
* Reformatted functions for consistent internal structure
* 'package.R' deprecated. Replaced with 'ndi-package.R' and reordered the contents
* Consolidated DESCRIPTION
* Re-formatted code and documentation throughout for consistent readability
* Renamed 'race/ethnicity' or 'racial/ethnic' to 'race or ethnicity' or 'racial or ethnic' throughout documentation to use more modern, inclusive, and appropriate language
* Updated documentation about value range of *V* (White) from `{0 to 1}` to `{-Inf to Inf}`
* Added examples for `gini()`, `james_taeuber()`, `lieberson()`, `hoover()`, `theil()`, and `white_blau()` functions in vignette and README
* Split up vignette into three separate vignettes: 'ndi1', 'ndi2', and 'ndi3' for the *NDI*, racial or ethnic residential segregation, and additional socioeconomic disparity indices, respectively
* Added examples for `atkinson()`, `duncan_cuzzort()`, `gini()`, `hoover()`, `james_taeuber()`, `lieberson()`, `theil()`, and `white_blau()` functions in vignettes and README
* Added example for `holder` argument in `atkinson()` function in README
* Reformatted functions for consistent internal structure
* Updated examples in vignette to showcase a larger variety of U.S. states
* Reordered the README examples alphabetically
* Reordered the vignette examples to group the racial or ethnic residential segregation indices
* Updated examples in vignettes to showcase a larger variety of U.S. states
* Updated examples in functions to better describe the metrics
* Updated documentation formatting of metric names in all functions

Expand Down
Loading

0 comments on commit 3489d8f

Please sign in to comment.