Title: | Neighborhood Deprivation Indices |
Version: | 0.1.5 |
Date: | 2024-01-23 |
Maintainer: | Ian D. Buller <ian.buller@alumni.emory.edu> |
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 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: including: (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 racial/ethnic Dissimilarity Index based on Duncan & Duncan (1955) <doi:10.2307/2088328>, (5) compute the aspatial income or racial/ethnic Atkinson Index based on Atkinson (1970) <doi:10.1016/0022-0531(70)90039-6>, (6) aspatial racial/ethnic Isolation Index (II) based on Shevky & Williams (1949; ISBN-13:978-0-837-15637-8) and Bell (1954) <doi:10.2307/2574118>, (7) aspatial racial/ethnic Correlation Ratio based on Bell (1954) <doi:10.2307/2574118> and White (1986) <doi:10.2307/3644339>, (8) aspatial racial/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>, and (9) aspatial racial/ethnic Local Exposure and Isolation metric based on Bemanian & Beyer (2017) <doi:10.1158/1055-9965.EPI-16-0926>. Also using data from the ACS-5 (2005-2009 onward), the package can retrieve the aspatial Gini Index based Gini (1921) <doi:10.2307/2223319>. |
License: | Apache License (≥ 2.0) |
Encoding: | UTF-8 |
LazyData: | true |
RoxygenNote: | 7.2.3 |
Depends: | R (≥ 3.5.0) |
Imports: | car, dplyr, MASS, Matrix, psych, sf, stats, stringr, tidycensus, tidyr, utils |
Suggests: | DescTools, ggplot2, testthat, tigris, R.rsp, spelling, usethis |
VignetteBuilder: | R.rsp |
Language: | en-US |
URL: | https://github.com/idblr/ndi |
BugReports: | https://github.com/idblr/ndi/issues |
NeedsCompilation: | no |
Packaged: | 2024-01-23 18:32:01 UTC; ian.buller |
Author: | Ian D. Buller |
Repository: | CRAN |
Date/Publication: | 2024-01-23 19:20:06 UTC |
The ndi Package: Neighborhood Deprivation Indices
Description
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; 2006-2010 onward). Using data from the ACS-5 (2005-2009 onward), the package can also compute the (1) spatial Racial Isolation Index (RI) based on Anthopolos et al. (2011) doi:10.1016/j.sste.2011.06.002, (2) spatial Educational Isolation Index (EI) based on Bravo et al. (2021) doi:10.3390/ijerph18179384, (3) 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) aspatial racial/ethnic Dissimilarity Index based on Duncan & Duncan (1955) doi:10.2307/2088328, (5) aspatial income or racial/ethnic Atkinson Index based on Atkinson (1970) doi:10.1016/0022-0531(70)90039-6, (6) aspatial racial/ethnic Isolation Index (II) based on Shevky & Williams (1949; ISBN-13:978-0-837-15637-8) and Bell (1954) doi:10.2307/2574118, (7) aspatial racial/ethnic Correlation Ratio based on Bell (1954) doi:10.2307/2574118 and White (1986) doi:10.2307/3644339, and (8) aspatial racial/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. Also using data from the ACS-5 (2005-2009 onward), the package can retrieve the aspatial Gini Index based on Gini (1921) doi:10.2307/2223319.
Key content of the 'ndi' package include:
Metrics of Socio-Economic Deprivation and Disparity
anthopolos
Computes the spatial Racial Isolation Index (RI) based on Anthopolos (2011) doi:10.1016/j.sste.2011.06.002.
atkinson
Computes the aspatial income or racial/ethnic Atkinson Index (AI) based on Atkinson (1970) doi:10.1016/0022-0531(70)90039-6.
bell
Computes the aspatial racial/ethnic Isolation Index (II) based on Shevky & Williams (1949; ISBN-13:978-0-837-15637-8) and Bell (1954) doi:10.2307/2574118.
bemanian_beyer
Computes the aspatial racial/ethnic Local Exposure and Isolation (LEx/Is) metric based on Bemanian & Beyer (2017) doi:10.1158/1055-9965.EPI-16-0926.
bravo
Computes the spatial Educational Isolation Index (EI) based on Bravo (2021) doi:10.3390/ijerph18179384.
duncan
Computes the aspatial racial/ethnic Dissimilarity Index (DI) based on Duncan & Duncan (1955) doi:10.2307/2088328.
gini
Retrieves the aspatial Gini Index based on Gini (1921) doi:10.2307/2223319.
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.
messer
Computes the aspatial Neighborhood Deprivation Index (NDI) based on Messer et al. (2006) doi:10.1007/s11524-006-9094-x.
powell_wiley
Computes the aspatial Neighborhood Deprivation Index (NDI) 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.
sudano
Computes the aspatial racial/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.
white
Computes the aspatial racial/ethnic Correlation Ratio (V) based on Bell (1954) doi:10.2307/2574118 and White (1986) doi:10.2307/3644339.
Pre-formatted U.S. Census Data
DCtracts2020
A sample dataset 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 get_acs
function and formatted for the messer
and powell_wiley
functions input.
Dependencies
The 'ndi' package relies heavily upon tidycensus
to retrieve data from the U.S. Census Bureau American Community Survey five-year estimates and the psych
for computing the neighborhood deprivation indices. The messer
function builds upon code developed by Hruska et al. (2022) doi:10.17605/OSF.IO/M2SAV by fictionalizing, adding the percent of households earning <$30,000 per year to the NDI computation, and providing the option for computing the ACS-5 2006-2010 NDI values. There is no code companion to compute NDI included in Andrews et al. (2020) doi:10.1080/17445647.2020.1750066 or Slotman et al. (2022) doi:10.1016/j.dib.2022.108002, but the package author worked directly with the Slotman et al. (2022) doi:10.1016/j.dib.2022.108002 authors to replicate their SAS code in R. The spatial metrics RI and EI rely on the sf
and Matrix
packages to compute the geospatial adjacency matrix between census geographies. Internal function to calculate AI is based on Atkinson
function. There is no code companion to compute RI, EI, DI, II, V, LQ, or LEx/Is included in Anthopolos et al. (2011) doi:10.1016/j.sste.2011.06.002, Bravo et al. (2021) doi:10.3390/ijerph18179384, Duncan & Duncan (1955) doi:10.2307/2088328, Bell (1954) doi:10.2307/2574118, White (1986) doi:10.2307/3644339, Sudano et al. (2013) doi:10.1016/j.healthplace.2012.09.015, or Bemanian & Beyer (2017) doi:10.1158/1055-9965.EPI-16-0926, respectively.
Author(s)
Ian D. Buller
Social & Scientific Systems, Inc., a division of DLH Corporation, Silver Spring, Maryland, USA (current); Occupational and Environmental Epidemiology Branch, Division of Cancer Epidemiology and Genetics, National Cancer Institute, National Institutes of Health, Rockville, Maryland, USA (original).
Maintainer: I.D.B. ian.buller@alumni.emory.edu
Formatted U.S. Census American Community Survey 5-year estimate data for DC census tracts (2020) from the 'tidycensus' package
Description
A sample dataset 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 get_acs
function and formatted for the messer
and powell_wiley
functions input.
Usage
DCtracts2020
Format
A data frame with 206 rows and 23 variables:
- GEOID
census tract ID
- TotalPop
arcsinh-transformed CD3
- OCC
percent males in management, science, and arts occupation
- CWD
percent of crowded housing
- POV
percent of households in poverty
- FHH
percent of female headed households with dependents
- PUB
percent of households on public assistance
- U30
percent of households earning <$30,000 per year
- EDU
percent earning less than a high school education
- EMP
percent unemployed
- logMedHHInc
median household income (dollars), natural log-transformed
- PctNoIDRZ
percent of households receiving dividends, interest, or rental income, Z-transformed
- PctPubAsstZ
percent of households receiving public assistance, Z-transformed
- logMedHomeVal
median home value (dollars), natural log-transformed
- PctWorkClassZ
percent in a management, business, science, or arts occupation, Z-transformed
- PctFemHeadKidsZ
percent of households that are female headed with any children under 18 years, Z-transformed
- PctNotOwnerOccZ
percent of housing units that are owner occupied, Z-transformed
- PctNoPhoneZ
percent of households without a telephone, Z-transformed
- PctNComPlmbZ
percent of households without complete plumbing facilities, Z-transformed
- PctEducLTHSZ
percent with a high school degree or higher (population 25 years and over), Z-transformed
- PctEducLTBchZ
percent with a college degree or higher (population 25 years and over), Z-transformed
- PctFamBelowPovZ
percent of families with incomes below the poverty level, Z-transformed
- PctUnemplZ
percent unemployed, Z-transformed
Source
https://github.com/idblr/ndi/blob/master/README.md
Examples
head(DCtracts2020)
Racial Isolation Index based on Anthopolos et al. (2011)
Description
Compute the spatial Racial Isolation Index (Anthopolos) of selected subgroup(s).
Usage
anthopolos(geo = "tract", year = 2020, subgroup, quiet = FALSE, ...)
Arguments
geo |
Character string specifying the geography of the data either census tracts |
year |
Numeric. The year to compute the estimate. The default is 2020, and the years 2009 onward are currently available. |
subgroup |
Character string specifying the racial/ethnic subgroup(s). See Details for available choices. |
quiet |
Logical. If TRUE, will display messages about potential missing census information. The default is FALSE. |
... |
Arguments passed to |
Details
This function will compute the spatial Racial Isolation Index (RI) of U.S. census tracts or counties for a specified geographical extent (e.g., the entire U.S. or a single state) based on Anthopolos et al. (2011) doi:10.1016/j.sste.2011.06.002 who originally designed the metric for the racial isolation of non-Hispanic Black individuals. This function provides the computation of RI for any of the U.S. Census Bureau race/ethnicity subgroups (including Hispanic and non-Hispanic individuals).
The function uses the get_acs
function to obtain U.S. Census Bureau 5-year American Community Survey characteristics used for the geospatial computation. The yearly estimates are available for 2009 onward when ACS-5 data are available but are available from other U.S. Census Bureau surveys. The twenty racial/ethnic subgroups (U.S. Census Bureau definitions) are:
-
B03002_002: not Hispanic or Latino
"NHoL"
-
B03002_003: not Hispanic or Latino, white alone
"NHoLW"
-
B03002_004: not Hispanic or Latino, Black or African American alone
"NHoLB"
-
B03002_005: not Hispanic or Latino, American Indian and Alaska Native alone
"NHoLAIAN"
-
B03002_006: not Hispanic or Latino, Asian alone
"NHoLA"
-
B03002_007: not Hispanic or Latino, Native Hawaiian and Other Pacific Islander alone
"NHoLNHOPI"
-
B03002_008: not Hispanic or Latino, Some other race alone
"NHoLSOR"
-
B03002_009: not Hispanic or Latino, Two or more races
"NHoLTOMR"
-
B03002_010: not Hispanic or Latino, Two races including Some other race
"NHoLTRiSOR"
-
B03002_011: not Hispanic or Latino, Two races excluding Some other race, and three or more races
"NHoLTReSOR"
-
B03002_012: Hispanic or Latino
"HoL"
-
B03002_013: Hispanic or Latino, white alone
"HoLW"
-
B03002_014: Hispanic or Latino, Black or African American alone
"HoLB"
-
B03002_015: Hispanic or Latino, American Indian and Alaska Native alone
"HoLAIAN"
-
B03002_016: Hispanic or Latino, Asian alone
"HoLA"
-
B03002_017: Hispanic or Latino, Native Hawaiian and Other Pacific Islander alone
"HoLNHOPI"
-
B03002_018: Hispanic or Latino, Some other race alone
"HoLSOR"
-
B03002_019: Hispanic or Latino, Two or more races
"HoLTOMR"
-
B03002_020: Hispanic or Latino, Two races including Some other race
"HoLTRiSOR"
-
B03002_021: Hispanic or Latino, Two races excluding Some other race, and three or more races
"HoLTReSOR"
Use the internal state
and county
arguments within the get_acs
function to specify geographic extent of the data output. NOTE: Current version does not correct for edge effects (e.g., census geographies along the specified spatial extent border, coastline, or U.S.-Mexico / U.S.-Canada border) may have few neighboring census geographies, and RI values in these census geographies may be unstable. A stop-gap solution for the former source of edge effect is to compute the RI for neighboring census geographies (i.e., the states bordering a study area of interest) and then use the estimates of the study area of interest.
A census geography (and its neighbors) that has nearly all of its population who identify with the specified race/ethnicity subgroup(s) (e.g., non-Hispanic or Latino, Black or African American alone) will have an RI value close to 1. In contrast, a census geography (and its neighbors) that has nearly none of its population who identify with the specified race/ethnicity subgroup(s) (e.g., not non-Hispanic or Latino, Black or African American alone) will have an RI value close to 0.
Value
An object of class 'list'. This is a named list with the following components:
ri
An object of class 'tbl' for the GEOID, name, RI, and raw census values of specified census geographies.
missing
An object of class 'tbl' of the count and proportion of missingness for each census variable used to compute RI.
See Also
get_acs
for additional arguments for geographic extent selection (i.e., state
and county
).
Examples
## Not run:
# Wrapped in \dontrun{} because these examples require a Census API key.
# Tract-level metric (2020)
anthopolos(geo = "tract", state = "GA",
year = 2020, subgroup = c("NHoLB", "HoLB"))
# County-level metric (2020)
anthopolos(geo = "county", state = "GA",
year = 2020, subgroup = c("NHoLB", "HoLB"))
## End(Not run)
Atkinson Index based on Atkinson (1970)
Description
Compute the aspatial Atkinson Index of income or selected racial/ethnic subgroup(s) and U.S. geographies.
Usage
atkinson(
geo_large = "county",
geo_small = "tract",
year = 2020,
subgroup,
epsilon = 0.5,
omit_NAs = TRUE,
quiet = FALSE,
...
)
Arguments
geo_large |
Character string specifying the larger geographical unit of the data. The default is counties |
geo_small |
Character string specifying the smaller geographical unit of the data. The default is census tracts |
year |
Numeric. The year to compute the estimate. The default is 2020, and the years 2009 onward are currently available. |
subgroup |
Character string specifying the income or racial/ethnic subgroup(s) as the comparison population. See Details for available choices. |
epsilon |
Numerical. Shape parameter that denotes the aversion to inequality. Value must be between 0 and 1.0 (the default is 0.5). |
omit_NAs |
Logical. If FALSE, will compute index for a larger geographical unit only if all of its smaller geographical units have values. The default is TRUE. |
quiet |
Logical. If TRUE, will display messages about potential missing census information. The default is FALSE. |
... |
Arguments passed to |
Details
This function will compute the aspatial Atkinson Index (AI) of income or 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 Atkinson (1970) doi:10.1016/0022-0531(70)90039-6. This function provides the computation of AI for median household income and any of the U.S. Census Bureau race/ethnicity subgroups (including Hispanic and non-Hispanic individuals).
The function uses the get_acs
function to obtain U.S. Census Bureau 5-year American Community Survey characteristics used for the aspatial computation. The yearly estimates are available for 2009 onward when ACS-5 data are available but are available from other U.S. Census Bureau surveys. When subgroup = "MedHHInc"
, the metric will be computed for median household income ("B19013_001"). The twenty racial/ethnic subgroups (U.S. Census Bureau definitions) are:
-
B03002_002: not Hispanic or Latino
"NHoL"
-
B03002_003: not Hispanic or Latino, white alone
"NHoLW"
-
B03002_004: not Hispanic or Latino, Black or African American alone
"NHoLB"
-
B03002_005: not Hispanic or Latino, American Indian and Alaska Native alone
"NHoLAIAN"
-
B03002_006: not Hispanic or Latino, Asian alone
"NHoLA"
-
B03002_007: not Hispanic or Latino, Native Hawaiian and Other Pacific Islander alone
"NHoLNHOPI"
-
B03002_008: not Hispanic or Latino, Some other race alone
"NHoLSOR"
-
B03002_009: not Hispanic or Latino, Two or more races
"NHoLTOMR"
-
B03002_010: not Hispanic or Latino, Two races including Some other race
"NHoLTRiSOR"
-
B03002_011: not Hispanic or Latino, Two races excluding Some other race, and three or more races
"NHoLTReSOR"
-
B03002_012: Hispanic or Latino
"HoL"
-
B03002_013: Hispanic or Latino, white alone
"HoLW"
-
B03002_014: Hispanic or Latino, Black or African American alone
"HoLB"
-
B03002_015: Hispanic or Latino, American Indian and Alaska Native alone
"HoLAIAN"
-
B03002_016: Hispanic or Latino, Asian alone
"HoLA"
-
B03002_017: Hispanic or Latino, Native Hawaiian and Other Pacific Islander alone
"HoLNHOPI"
-
B03002_018: Hispanic or Latino, Some other race alone
"HoLSOR"
-
B03002_019: Hispanic or Latino, Two or more races
"HoLTOMR"
-
B03002_020: Hispanic or Latino, Two races including Some other race
"HoLTRiSOR"
-
B03002_021: Hispanic or Latino, Two races excluding Some other race, and three or more races
"HoLTReSOR"
Use the internal state
and county
arguments within the get_acs
function to specify geographic extent of the data output.
AI is a measure of the evenness of residential inequality (e.g., racial/ethnic segregation) when comparing smaller geographical areas to larger ones within which the smaller geographical areas are located. The AI metric can range in value from 0 to 1 with smaller values indicating lower levels of inequality (e.g., less segregation).
The epsilon
argument that determines how to weight the increments to inequality contributed by different proportions of the Lorenz curve. A user must explicitly decide how heavily to weight smaller geographical units at different points on the Lorenz curve (i.e., whether the index should take greater account of differences among areas of over- or under-representation). The epsilon
argument must have values between 0 and 1.0. For 0 <= epsilon < 0.5
or less "inequality-averse," smaller geographical units with a subgroup proportion smaller than the subgroup proportion of the larger geographical unit contribute more to inequality ("over-representation"). For 0.5 < epsilon <= 1.0
or more "inequality-averse," smaller geographical units with a subgroup proportion larger than the subgroup proportion of the larger geographical unit contribute more to inequality ("under-representation"). If epsilon = 0.5
(the default), units of over- and under-representation contribute equally to the index. See Section 2.3 of Saint-Jacques et al. (2020) doi:10.48550/arXiv.2002.05819 for one method to select epsilon
.
Larger geographies available include state geo_large = "state"
, county geo_large = "county"
, and census tract geo_large = "tract"
levels. Smaller geographies available include, county geo_small = "county"
, census tract geo_small = "tract"
, and census block group geo_small = "block group"
levels. If a larger geographical area is comprised of only one smaller geographical area (e.g., a U.S county contains only one census tract), then the AI value returned is NA.
Value
An object of class 'list'. This is a named list with the following components:
ai
An object of class 'tbl' for the GEOID, name, and AI at specified larger census geographies.
ai_data
An object of class 'tbl' for the raw census values at specified smaller census geographies.
missing
An object of class 'tbl' of the count and proportion of missingness for each census variable used to compute AI.
See Also
get_acs
for additional arguments for geographic extent selection (i.e., state
and county
).
Examples
## Not run:
# Wrapped in \dontrun{} because these examples require a Census API key.
# Atkinson Index of non-Hispanic Black populations
## of census tracts within Georgia, U.S.A., counties (2020)
atkinson(geo_large = "county", geo_small = "tract", state = "GA",
year = 2020, subgroup = "NHoLB")
## End(Not run)
Isolation Index based on Shevky & Williams (1949) and Bell (1954)
Description
Compute the aspatial Isolation Index (Bell) of a selected racial/ethnic subgroup(s) and U.S. geographies.
Usage
bell(
geo_large = "county",
geo_small = "tract",
year = 2020,
subgroup,
subgroup_ixn,
omit_NAs = TRUE,
quiet = FALSE,
...
)
Arguments
geo_large |
Character string specifying the larger geographical unit of the data. The default is counties |
geo_small |
Character string specifying the smaller geographical unit of the data. The default is census tracts |
year |
Numeric. The year to compute the estimate. The default is 2020, and the years 2009 onward are currently available. |
subgroup |
Character string specifying the racial/ethnic subgroup(s). See Details for available choices. |
subgroup_ixn |
Character string specifying the racial/ethnic subgroup(s) as the interaction population. If the same as |
omit_NAs |
Logical. If FALSE, will compute index for a larger geographical unit only if all of its smaller geographical units have values. The default is TRUE. |
quiet |
Logical. If TRUE, will display messages about potential missing census information. The default is FALSE. |
... |
Arguments passed to |
Details
This function will compute the aspatial Isolation Index (II) 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 Shevky & Williams (1949; ISBN-13:978-0-837-15637-8) and Bell (1954) doi:10.2307/2574118. This function provides the computation of II for any of the U.S. Census Bureau race/ethnicity subgroups (including Hispanic and non-Hispanic individuals).
The function uses the get_acs
function to obtain U.S. Census Bureau 5-year American Community Survey characteristics used for the aspatial computation. The yearly estimates are available for 2009 onward when ACS-5 data are available but are available from other U.S. Census Bureau surveys. The twenty racial/ethnic subgroups (U.S. Census Bureau definitions) are:
-
B03002_002: not Hispanic or Latino
"NHoL"
-
B03002_003: not Hispanic or Latino, white alone
"NHoLW"
-
B03002_004: not Hispanic or Latino, Black or African American alone
"NHoLB"
-
B03002_005: not Hispanic or Latino, American Indian and Alaska Native alone
"NHoLAIAN"
-
B03002_006: not Hispanic or Latino, Asian alone
"NHoLA"
-
B03002_007: not Hispanic or Latino, Native Hawaiian and Other Pacific Islander alone
"NHoLNHOPI"
-
B03002_008: not Hispanic or Latino, Some other race alone
"NHoLSOR"
-
B03002_009: not Hispanic or Latino, Two or more races
"NHoLTOMR"
-
B03002_010: not Hispanic or Latino, Two races including Some other race
"NHoLTRiSOR"
-
B03002_011: not Hispanic or Latino, Two races excluding Some other race, and three or more races
"NHoLTReSOR"
-
B03002_012: Hispanic or Latino
"HoL"
-
B03002_013: Hispanic or Latino, white alone
"HoLW"
-
B03002_014: Hispanic or Latino, Black or African American alone
"HoLB"
-
B03002_015: Hispanic or Latino, American Indian and Alaska Native alone
"HoLAIAN"
-
B03002_016: Hispanic or Latino, Asian alone
"HoLA"
-
B03002_017: Hispanic or Latino, Native Hawaiian and Other Pacific Islander alone
"HoLNHOPI"
-
B03002_018: Hispanic or Latino, Some other race alone
"HoLSOR"
-
B03002_019: Hispanic or Latino, Two or more races
"HoLTOMR"
-
B03002_020: Hispanic or Latino, Two races including Some other race
"HoLTRiSOR"
-
B03002_021: Hispanic or Latino, Two races excluding Some other race, and three or more races
"HoLTReSOR"
Use the internal state
and county
arguments within the get_acs
function to specify geographic extent of the data output.
II is some measure of the probability that a member of one subgroup(s) will meet or interact with a member of another subgroup(s) with higher values signifying higher probability of interaction (less isolation). II can range in value from 0 to 1.
Larger geographies available include state geo_large = "state"
, county geo_large = "county"
, and census tract geo_large = "tract"
levels. Smaller geographies available include, county geo_small = "county"
, census tract geo_small = "tract"
, and census block group geo_small = "block group"
levels. If a larger geographical area is comprised of only one smaller geographical area (e.g., a U.S county contains only one census tract), then the II value returned is NA.
Value
An object of class 'list'. This is a named list with the following components:
ii
An object of class 'tbl' for the GEOID, name, and II at specified larger census geographies.
ii_data
An object of class 'tbl' for the raw census values at specified smaller census geographies.
missing
An object of class 'tbl' of the count and proportion of missingness for each census variable used to compute II.
See Also
get_acs
for additional arguments for geographic extent selection (i.e., state
and county
).
Examples
## Not run:
# Wrapped in \dontrun{} because these examples require a Census API key.
# Isolation of non-Hispanic Black vs. non-Hispanic white populations
## of census tracts within Georgia, U.S.A., counties (2020)
bell(geo_large = "county", geo_small = "tract", state = "GA",
year = 2020, subgroup = "NHoLB", subgroup_ixn = "NHoLW")
## End(Not run)
Local Exposure and Isolation metric based on Bemanian & Beyer (2017)
Description
Compute the aspatial Local Exposure and Isolation (Bemanian & Beyer) metric of a selected racial/ethnic subgroup(s) and U.S. geographies.
Usage
bemanian_beyer(
geo_large = "county",
geo_small = "tract",
year = 2020,
subgroup,
subgroup_ixn,
omit_NAs = TRUE,
quiet = FALSE,
...
)
Arguments
geo_large |
Character string specifying the larger geographical unit of the data. The default is counties |
geo_small |
Character string specifying the smaller geographical unit of the data. The default is census tracts |
year |
Numeric. The year to compute the estimate. The default is 2020, and the years 2009 onward are currently available. |
subgroup |
Character string specifying the racial/ethnic subgroup(s). See Details for available choices. |
subgroup_ixn |
Character string specifying the racial/ethnic subgroup(s) as the interaction population. If the same as |
omit_NAs |
Logical. If FALSE, will compute index for a larger geographical unit only if all of its smaller geographical units have values. The default is TRUE. |
quiet |
Logical. If TRUE, will display messages about potential missing census information. The default is FALSE. |
... |
Arguments passed to |
Details
This function will compute the aspatial Local Exposure and Isolation (LEx/Is) metric 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 Bemanian & Beyer (2017) doi:10.1158/1055-9965.EPI-16-0926. This function provides the computation of LEx/Is for any of the U.S. Census Bureau race/ethnicity subgroups (including Hispanic and non-Hispanic individuals).
The function uses the get_acs
function to obtain U.S. Census Bureau 5-year American Community Survey characteristics used for the aspatial computation. The yearly estimates are available for 2009 onward when ACS-5 data are available but are available from other U.S. Census Bureau surveys. The twenty racial/ethnic subgroups (U.S. Census Bureau definitions) are:
-
B03002_002: not Hispanic or Latino
"NHoL"
-
B03002_003: not Hispanic or Latino, white alone
"NHoLW"
-
B03002_004: not Hispanic or Latino, Black or African American alone
"NHoLB"
-
B03002_005: not Hispanic or Latino, American Indian and Alaska Native alone
"NHoLAIAN"
-
B03002_006: not Hispanic or Latino, Asian alone
"NHoLA"
-
B03002_007: not Hispanic or Latino, Native Hawaiian and Other Pacific Islander alone
"NHoLNHOPI"
-
B03002_008: not Hispanic or Latino, Some other race alone
"NHoLSOR"
-
B03002_009: not Hispanic or Latino, Two or more races
"NHoLTOMR"
-
B03002_010: not Hispanic or Latino, Two races including Some other race
"NHoLTRiSOR"
-
B03002_011: not Hispanic or Latino, Two races excluding Some other race, and three or more races
"NHoLTReSOR"
-
B03002_012: Hispanic or Latino
"HoL"
-
B03002_013: Hispanic or Latino, white alone
"HoLW"
-
B03002_014: Hispanic or Latino, Black or African American alone
"HoLB"
-
B03002_015: Hispanic or Latino, American Indian and Alaska Native alone
"HoLAIAN"
-
B03002_016: Hispanic or Latino, Asian alone
"HoLA"
-
B03002_017: Hispanic or Latino, Native Hawaiian and Other Pacific Islander alone
"HoLNHOPI"
-
B03002_018: Hispanic or Latino, Some other race alone
"HoLSOR"
-
B03002_019: Hispanic or Latino, Two or more races
"HoLTOMR"
-
B03002_020: Hispanic or Latino, Two races including Some other race
"HoLTRiSOR"
-
B03002_021: Hispanic or Latino, Two races excluding Some other race, and three or more races
"HoLTReSOR"
Use the internal state
and county
arguments within the get_acs
function to specify geographic extent of the data output.
LEx/Is is a measure of the probability that two individuals living within a specific smaller geography (e.g., census tract) of either different (i.e., exposure) or the same (i.e., isolation) racial/ethnic subgroup(s) will interact, assuming that individuals within a smaller geography are randomly mixed. LEx/Is is standardized with a logit transformation and centered against an expected case that all races/ethnicities are evenly distributed across a larger geography. (Note: will adjust data by 0.025 if probabilities are zero, one, or undefined. The output will include a warning if adjusted. See logit
for additional details.)
LEx/Is can range from negative infinity to infinity. If LEx/Is is zero then the estimated probability of the interaction between two people of the given subgroup(s) within a smaller geography is equal to the expected probability if the subgroup(s) were perfectly mixed in the larger geography. If LEx/Is is greater than zero then the interaction is more likely to occur within the smaller geography than in the larger geography, and if LEx/Is is less than zero then the interaction is less likely to occur within the smaller geography than in the larger geography. Note: the exponentiation of each LEx/Is metric results in the odds ratio of the specific exposure or isolation of interest in a smaller geography relative to the larger geography.
Larger geographies available include state geo_large = "state"
, county geo_large = "county"
, and census tract geo_large = "tract"
levels. Smaller geographies available include, county geo_small = "county"
, census tract geo_small = "tract"
, and census block group geo_small = "block group"
levels. If a larger geographical area is comprised of only one smaller geographical area (e.g., a U.S county contains only one census tract), then the LEx/Is value returned is NA.
Value
An object of class 'list'. This is a named list with the following components:
lexis
An object of class 'tbl' for the GEOID, name, and LEx/Is at specified smaller census geographies.
lexis_data
An object of class 'tbl' for the raw census values at specified smaller census geographies.
missing
An object of class 'tbl' of the count and proportion of missingness for each census variable used to compute LEx/Is.
See Also
get_acs
for additional arguments for geographic extent selection (i.e., state
and county
).
Examples
## Not run:
# Wrapped in \dontrun{} because these examples require a Census API key.
# Isolation of non-Hispanic Black vs. non-Hispanic white populations
## of census tracts within Georgia, U.S.A., counties (2020)
bemanian_beyer(geo_large = "county", geo_small = "tract", state = "GA",
year = 2020, subgroup = "NHoLB", subgroup_ixn = "NHoLW")
## End(Not run)
Educational Isolation Index based on Bravo et al. (2021)
Description
Compute the spatial Educational Isolation Index (Bravo) of selected educational attainment category(ies).
Usage
bravo(geo = "tract", year = 2020, subgroup, quiet = FALSE, ...)
Arguments
geo |
Character string specifying the geography of the data either census tracts |
year |
Numeric. The year to compute the estimate. The default is 2020, and the years 2009 onward are currently available. |
subgroup |
Character string specifying the educational attainment category(ies). See Details for available choices. |
quiet |
Logical. If TRUE, will display messages about potential missing census information. The default is FALSE. |
... |
Arguments passed to |
Details
This function will compute the spatial Educational Isolation Index (EI) of U.S. census tracts or counties for a specified geographical extent (e.g., the entire U.S. or a single state) based on Bravo et al. (2021) doi:10.3390/ijerph18179384 who originally designed the metric for the educational isolation of individual without a college degree. This function provides the computation of EI for any of the U.S. Census Bureau educational attainment levels.
The function uses the get_acs
function to obtain U.S. Census Bureau 5-year American Community Survey characteristics used for the geospatial computation. The yearly estimates are available for 2009 onward when ACS-5 data are available but are available from other U.S. Census Bureau surveys. The five educational attainment levels (U.S. Census Bureau definitions) are:
-
B06009_002: Less than high school graduate
"LtHS"
-
B06009_003: High school graduate (includes equivalency)
"HSGiE"
-
B06009_004: Some college or associate's degree
"SCoAD"
-
B06009_005: Bachelor's degree
"BD"
-
B06009_006: Graduate or professional degree
"GoPD"
Note: If year = 2009
, then the ACS-5 data (2005-2009) are from the B15002 question.
Use the internal state
and county
arguments within the get_acs
function to specify geographic extent of the data output. NOTE: Current version does not correct for edge effects (e.g., census geographies along the specified spatial extent border, coastline, or U.S.-Mexico / U.S.-Canada border) may have few neighboring census geographies, and EI values in these census geographies may be unstable. A stop-gap solution for the former source of edge effect is to compute the EI for neighboring census geographies (i.e., the states bordering a study area of interest) and then use the estimates of the study area of interest.
A census geography (and its neighbors) that has nearly all of its population with the specified educational attainment category (e.g., a Bachelor's degree or more) will have an EI value close to 1. In contrast, a census geography (and its neighbors) that is nearly none of its population with the specified educational attainment category (e.g., less than a Bachelor's degree) will have an EI value close to 0.
Value
An object of class 'list'. This is a named list with the following components:
ei
An object of class 'tbl' for the GEOID, name, EI, and raw census values of specified census geographies.
missing
An object of class 'tbl' of the count and proportion of missingness for each census variable used to compute EI.
See Also
get_acs
for additional arguments for geographic extent selection (i.e., state
and county
).
Examples
## Not run:
# Wrapped in \dontrun{} because these examples require a Census API key.
# Tract-level metric (2020)
bravo(geo = "tract", state = "GA",
year = 2020, subgroup = c("LtHS", "HSGiE"))
# County-level metric (2020)
bravo(geo = "county", state = "GA",
year = 2020, subgroup = c("LtHS", "HSGiE"))
## End(Not run)
Dissimilarity Index based on Duncan & Duncan (1955)
Description
Compute the aspatial Dissimilarity Index (Duncan & Duncan) of selected racial/ethnic subgroup(s) and U.S. geographies
Usage
duncan(
geo_large = "county",
geo_small = "tract",
year = 2020,
subgroup,
subgroup_ref,
omit_NAs = TRUE,
quiet = FALSE,
...
)
Arguments
geo_large |
Character string specifying the larger geographical unit of the data. The default is counties |
geo_small |
Character string specifying the smaller geographical unit of the data. The default is census tracts |
year |
Numeric. The year to compute the estimate. The default is 2020, and the years 2009 onward are currently available. |
subgroup |
Character string specifying the racial/ethnic subgroup(s) as the comparison population. See Details for available choices. |
subgroup_ref |
Character string specifying the racial/ethnic subgroup(s) as the reference population. See Details for available choices. |
omit_NAs |
Logical. If FALSE, will compute index for a larger geographical unit only if all of its smaller geographical units have values. The default is TRUE. |
quiet |
Logical. If TRUE, will display messages about potential missing census information. The default is FALSE. |
... |
Arguments passed to |
Details
This function will compute the aspatial 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).
The function uses the get_acs
function to obtain U.S. Census Bureau 5-year American Community Survey characteristics used for the aspatial computation. The yearly estimates are available for 2009 onward when ACS-5 data are available but are available from other U.S. Census Bureau surveys. The twenty racial/ethnic subgroups (U.S. Census Bureau definitions) are:
-
B03002_002: not Hispanic or Latino
"NHoL"
-
B03002_003: not Hispanic or Latino, white alone
"NHoLW"
-
B03002_004: not Hispanic or Latino, Black or African American alone
"NHoLB"
-
B03002_005: not Hispanic or Latino, American Indian and Alaska Native alone
"NHoLAIAN"
-
B03002_006: not Hispanic or Latino, Asian alone
"NHoLA"
-
B03002_007: not Hispanic or Latino, Native Hawaiian and Other Pacific Islander alone
"NHoLNHOPI"
-
B03002_008: not Hispanic or Latino, Some other race alone
"NHoLSOR"
-
B03002_009: not Hispanic or Latino, Two or more races
"NHoLTOMR"
-
B03002_010: not Hispanic or Latino, Two races including Some other race
"NHoLTRiSOR"
-
B03002_011: not Hispanic or Latino, Two races excluding Some other race, and three or more races
"NHoLTReSOR"
-
B03002_012: Hispanic or Latino
"HoL"
-
B03002_013: Hispanic or Latino, white alone
"HoLW"
-
B03002_014: Hispanic or Latino, Black or African American alone
"HoLB"
-
B03002_015: Hispanic or Latino, American Indian and Alaska Native alone
"HoLAIAN"
-
B03002_016: Hispanic or Latino, Asian alone
"HoLA"
-
B03002_017: Hispanic or Latino, Native Hawaiian and Other Pacific Islander alone
"HoLNHOPI"
-
B03002_018: Hispanic or Latino, Some other race alone
"HoLSOR"
-
B03002_019: Hispanic or Latino, Two or more races
"HoLTOMR"
-
B03002_020: Hispanic or Latino, Two races including Some other race
"HoLTRiSOR"
-
B03002_021: Hispanic or Latino, Two races excluding Some other race, and three or more races
"HoLTReSOR"
Use the internal state
and county
arguments within the get_acs
function to specify geographic extent of the data output.
DI is a measure of the evenness of racial/ethnic residential segregation when comparing smaller geographical areas to larger ones within which the smaller geographical areas are located. DI can range in value from 0 to 1 and represents the proportion of racial/ethnic subgroup members that would have to change their area of residence to achieve an even distribution within the larger geographical area under conditions of maximum segregation.
Larger geographies available include state geo_large = "state"
, county geo_large = "county"
, and census tract geo_large = "tract"
levels. Smaller geographies available include, county geo_small = "county"
, census tract geo_small = "tract"
, and census block group geo_small = "block group"
levels. If a larger geographical area is comprised of only one smaller geographical area (e.g., a U.S county contains only one census tract), then the DI value returned is NA.
Value
An object of class 'list'. This is a named list with the following components:
di
An object of class 'tbl' for the GEOID, name, and DI at specified larger census geographies.
di_data
An object of class 'tbl' for the raw census values at specified smaller census geographies.
missing
An object of class 'tbl' of the count and proportion of missingness for each census variable used to compute DI.
See Also
get_acs
for additional arguments for geographic extent selection (i.e., state
and county
).
Examples
## Not run:
# Wrapped in \dontrun{} because these examples require a Census API key.
# Dissimilarity Index of non-Hispanic Black vs. non-Hispanic white populations
## of census tracts within Georgia, U.S.A., counties (2020)
duncan(geo_large = "county", geo_small = "tract", state = "GA",
year = 2020, subgroup = "NHoLB", subgroup_ref = "NHoLW")
## End(Not run)
Gini Index based on Gini (1921)
Description
Retrieve the aspatial Gini Index of income inequality.
Usage
gini(geo = "tract", year = 2020, quiet = FALSE, ...)
Arguments
geo |
Character string specifying the geography of the data either census tracts |
year |
Numeric. The year to compute the estimate. The default is 2020, and the years 2009 onward are currently available. |
quiet |
Logical. If TRUE, will display messages about potential missing census information |
... |
Arguments passed to |
Details
This function will retrieve the aspatial Gini Index of U.S. census tracts or counties for a specified geographical extent (e.g., the entire U.S. or a single state) based on Gini (1921) doi:10.2307/2223319.
The function uses the get_acs
function to obtain U.S. Census Bureau 5-year American Community Survey estimates of the Gini Index for income inequality (ACS: B19083). The estimates are available for 2009 onward when ACS-5 data are available but are available from other U.S. Census Bureau surveys.
Use the internal state
and county
arguments within the get_acs
function to specify geographic extent of the data output.
According to the U.S. Census Bureau https://www.census.gov/topics/income-poverty/income-inequality/about/metrics/gini-index.html: "The Gini Index is a summary measure of income inequality. The Gini coefficient incorporates the detailed shares data into a single statistic, which summarizes the dispersion of income across the entire income distribution. The Gini coefficient ranges from 0, indicating perfect equality (where everyone receives an equal share), to 1, perfect inequality (where only one recipient or group of recipients receives all the income). The Gini is based on the difference between the Lorenz curve (the observed cumulative income distribution) and the notion of a perfectly equal income distribution."
Value
An object of class 'list'. This is a named list with the following components:
gini
An object of class 'tbl' for the GEOID, name, and Gini index of specified census geographies.
missing
An object of class 'tbl' of the count and proportion of missingness for the Gini index.
See Also
get_acs
for additional arguments for geographic extent selection (i.e., state
and county
).
Examples
## Not run:
# Wrapped in \dontrun{} because these examples require a Census API key.
# Tract-level metric (2020)
gini(geo = "tract", state = "GA", year = 2020)
# County-level metric (2020)
gini(geo = "county", state = "GA", year = 2020)
## End(Not run)
Index of Concentration at the Extremes based on Feldman et al. (2015) and Krieger et al. (2016)
Description
Compute the aspatial Index of Concentration at the Extremes (Krieger).
Usage
krieger(geo = "tract", year = 2020, quiet = FALSE, ...)
Arguments
geo |
Character string specifying the geography of the data either census tracts |
year |
Numeric. The year to compute the estimate. The default is 2020, and the years 2009 onward are currently available. |
quiet |
Logical. If TRUE, will display messages about potential missing census information. The default is FALSE. |
... |
Arguments passed to |
Details
This function will compute three aspatial Index of Concentration at the Extremes (ICE) of U.S. census tracts or counties for a specified geographical extent (e.g., entire U.S. or a single state) based on Feldman et al. (2015) doi:10.1136/jech-2015-205728 and Krieger et al. (2016) doi:10.2105/AJPH.2015.302955. The authors expanded the metric designed by Massey in a chapter of Booth & Crouter (2001) doi:10.4324/9781410600141 who initially designed the metric for residential segregation. This function computes five ICE metrics:
-
Income: 80th income percentile vs. 20th income percentile
-
Education: less than high school vs. four-year college degree or more
-
Race/Ethnicity: white non-Hispanic vs. black non-Hispanic
-
Income and race/ethnicity combined: white non-Hispanic in 80th income percentile vs. black alone (including Hispanic) in 20th income percentile
-
Income and race/ethnicity combined: white non-Hispanic in 80th income percentile vs. white non-Hispanic in 20th income percentile
The function uses the get_acs
function to obtain U.S. Census Bureau 5-year American Community Survey characteristics used for the geospatial computation. The yearly estimates are available for 2009 onward when ACS-5 data are available but are available from other U.S. Census Bureau surveys. The ACS-5 groups used in the computation of the five ICE metrics are:
-
B03002: HISPANIC OR LATINO ORIGIN BY RACE
-
B15002: SEX BY EDUCATIONAL ATTAINMENT FOR THE POPULATION 25 YEARS AND OVER
-
B19001: HOUSEHOLD INCOME IN THE PAST 12 MONTHS (IN 20XX INFLATION-ADJUSTED DOLLARS)
-
B19001B: HOUSEHOLD INCOME IN THE PAST 12 MONTHS (IN 20XX INFLATION-ADJUSTED DOLLARS) (BLACK OR AFRICAN AMERICAN ALONE HOUSEHOLDER)
-
B19001H: HOUSEHOLD INCOME IN THE PAST 12 MONTHS (IN 20XX INFLATION-ADJUSTED DOLLARS) (WHITE ALONE, NOT HISPANIC OR LATINO HOUSEHOLDER)
Use the internal state
and county
arguments within the get_acs
function to specify geographic extent of the data output.
ICE metrics can range in value from -1 (most deprived) to 1 (most privileged). A value of 0 can thus represent two possibilities: (1) none of the residents are in the most privileged or most deprived categories, or (2) an equal number of persons are in the most privileged and most deprived categories, and in both cases indicates that the area is not dominated by extreme concentrations of either of the two groups.
Value
An object of class 'list'. This is a named list with the following components:
ice
An object of class 'tbl' for the GEOID, name, ICE metrics, and raw census values of specified census geographies.
missing
An object of class 'tbl' of the count and proportion of missingness for each census variable used to compute the ICEs.
See Also
get_acs
for additional arguments for geographic extent selection (i.e., state
and county
).
Examples
## Not run:
# Wrapped in \dontrun{} because these examples require a Census API key.
# Tract-level metric (2020)
krieger(geo = "tract", state = "GA", year = 2020)
# County-level metric (2020)
krieger(geo = "county", state = "GA", year = 2020)
## End(Not run)
Neighborhood Deprivation Index based on Messer et al. (2006)
Description
Compute the aspatial Neighborhood Deprivation Index (Messer).
Usage
messer(
geo = "tract",
year = 2020,
imp = FALSE,
quiet = FALSE,
round_output = FALSE,
df = NULL,
...
)
Arguments
geo |
Character string specifying the geography of the data either census tracts |
year |
Numeric. The year to compute the estimate. The default is 2020, and the years 2010 onward are currently available. |
imp |
Logical. If TRUE, will impute missing census characteristics within the internal |
quiet |
Logical. If TRUE, will display messages about potential missing census information and the proportion of variance explained by principal component analysis. The default is FALSE. |
round_output |
Logical. If TRUE, will round the output of raw census and NDI values from the |
df |
Optional. Pass a pre-formatted |
... |
Arguments passed to |
Details
This function will compute the aspatial Neighborhood Deprivation Index (NDI) of U.S. census tracts or counties for a specified geographical referent (e.g., US-standardized) based on Messer et al. (2006) doi:10.1007/s11524-006-9094-x.
The function uses the get_acs
function to obtain U.S. Census Bureau 5-year American Community Survey characteristics used for computation involving a principal component analysis with the principal
function. The yearly estimates are available for 2010 and after when all census characteristics became available. The eight characteristics are:
-
OCC (C24030): percent males in management, science, and arts occupation
-
CWD (B25014): percent of crowded housing
-
POV (B17017): percent of households in poverty
-
FHH (B25115): percent of female headed households with dependents
-
PUB (B19058): percent of households on public assistance
-
U30 (B19001): percent of households earning <$30,000 per year
-
EDU (B06009): percent earning less than a high school education
-
EMP (B23025): percent unemployed (2011 onward)
-
EMP (B23001): percent unemployed (2010 only)
Use the internal state
and county
arguments within the get_acs
function to specify the referent for standardizing the NDI (Messer) values. For example, if all U.S. states are specified for the state
argument, then the output would be a U.S.-standardized index.
The continuous NDI (Messer) values are z-transformed, i.e., "standardized," and the categorical NDI (Messer) values are quartiles of the standardized continuous NDI (Messer) values.
Check if the proportion of variance explained by the first principal component is high (more than 0.5).
Users can bypass get_acs
by specifying a pre-formatted data frame or tibble using the df
argument. This function will compute an index using the first component of a principal component analysis (PCA) with a Varimax rotation (the default for principal
) and only one factor (note: PCA set-up not unspecified in Messer et al. (2006)). The recommended structure of the data frame or tibble is an ID (e.g., GEOID) in the first feature (column), followed by the variables of interest (in any order) and no additional information (e.g., omit state or county names from the df
argument input).
Value
An object of class 'list'. This is a named list with the following components:
ndi
An object of class 'tbl' for the GEOID, name, NDI (standardized), NDI (quartile), and raw census values of specified census geographies.
pca
An object of class 'principal', returns the output of
principal
used to compute the NDI values.missing
An object of class 'tbl' of the count and proportion of missingness for each census variable used to compute NDI.
See Also
get_acs
for additional arguments for geographic referent selection (i.e., state
and county
).
Examples
messer(df = DCtracts2020[ , c(1, 3:10)])
## Not run:
# Wrapped in \dontrun{} because these examples require a Census API key.
# Tract-level metric (2020)
messer(geo = "tract", state = "GA", year = 2020)
# Impute NDI for tracts (2020) with missing census information (median values)
messer(state = "tract", "GA", year = 2020, imp = TRUE)
# County-level metric (2020)
messer(geo = "county", state = "GA", year = 2020)
## End(Not run)
Neighborhood Deprivation Index based on Andrews et al. (2020) and Slotman et al. (2022)
Description
Compute the aspatial Neighborhood Deprivation Index (Powell-Wiley).
Usage
powell_wiley(
geo = "tract",
year = 2020,
imp = FALSE,
quiet = FALSE,
round_output = FALSE,
df = NULL,
...
)
Arguments
geo |
Character string specifying the geography of the data either census tracts |
year |
Numeric. The year to compute the estimate. The default is 2020, and the years 2010 onward are currently available. |
imp |
Logical. If TRUE, will impute missing census characteristics within the internal |
quiet |
Logical. If TRUE, will display messages about potential missing census information, standardized Cronbach's alpha, and proportion of variance explained by principal component analysis. The default is FALSE. |
round_output |
Logical. If TRUE, will round the output of raw census and NDI values from the |
df |
Optional. Pass a pre-formatted |
... |
Arguments passed to |
Details
This function will compute the aspatial Neighborhood Deprivation Index (NDI) of U.S. census tracts or counties for a specified geographical referent (e.g., US-standardized) based on Andrews et al. (2020) doi:10.1080/17445647.2020.1750066 and Slotman et al. (2022) doi:10.1016/j.dib.2022.108002.
The function uses the get_acs
function to obtain U.S. Census Bureau 5-year American Community Survey characteristics used for computation involving a factor analysis with the principal
function. The yearly estimates are available in 2010 and after when all census characteristics became available. The thirteen characteristics chosen by Roux and Mair (2010) doi:10.1111/j.1749-6632.2009.05333.x are:
-
MedHHInc (B19013): median household income (dollars)
-
PctRecvIDR (B19054): percent of households receiving dividends, interest, or rental income
-
PctPubAsst (B19058): percent of households receiving public assistance
-
MedHomeVal (B25077): median home value (dollars)
-
PctMgmtBusScArti (C24060): percent in a management, business, science, or arts occupation
-
PctFemHeadKids (B11005): percent of households that are female headed with any children under 18 years
-
PctOwnerOcc (DP04): percent of housing units that are owner occupied
-
PctNoPhone (DP04): percent of households without a telephone
-
PctNComPlm (DP04): percent of households without complete plumbing facilities
-
PctEducHSPlus (S1501): percent with a high school degree or higher (population 25 years and over)
-
PctEducBchPlus (S1501): percent with a college degree or higher (population 25 years and over)
-
PctFamBelowPov (S1702): percent of families with incomes below the poverty level
-
PctUnempl (S2301): percent unemployed
Use the internal state
and county
arguments within the get_acs
function to specify the referent for standardizing the NDI (Powell-Wiley) values. For example, if all U.S. states are specified for the state
argument, then the output would be a U.S.-standardized index. Please note: the NDI (Powell-Wiley) values will not exactly match (but will highly correlate with) those found in Andrews et al. (2020) doi:10.1080/17445647.2020.1750066 and Slotman et al. (2022) doi: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 categorical NDI (Powell-Wiley) values are population-weighted quintiles of the continuous NDI (Powell-Wiley) values.
Check if the proportion of variance explained by the first principal component is high (more than 0.5).
Users can bypass get_acs
by specifying a pre-formatted data frame or tibble using the df
argument. This function will compute an index using the first component of a principal component analysis (PCA) with a Promax (oblique) rotation and a minimum Eigenvalue of 1, omitting variables with absolute loading score < 0.4. The recommended structure of the data frame or tibble is an ID (e.g., GEOID) in the first feature (column), an estimate of the total population in the second feature (column), followed by the variables of interest (in any order) and no additional information (e.g., omit state or county names from the df
argument input).
Value
An object of class 'list'. This is a named list with the following components:
ndi
An object of class 'tbl' for the GEOID, name, NDI continuous, NDI quintiles, and raw census values of specified census geographies.
pca
An object of class 'principal', returns the output of
principal
used to compute the NDI values.missing
An object of class 'tbl' of the count and proportion of missingness for each census variable used to compute NDI.
cronbach
An object of class 'character' or 'numeric' for the results of the Cronbach's alpha calculation. If only one factor is computed, a message is returned. If more than one factor is computed, Cronbach's alpha is calculated and should check that it is >0.7 for respectable internal consistency between factors.
See Also
get_acs
for additional arguments for geographic referent selection (i.e., state
and county
).
Examples
powell_wiley(df = DCtracts2020[ , -c(3:10)])
## Not run:
# Wrapped in \dontrun{} because these examples require a Census API key.
# Tract-level metric (2020)
powell_wiley(geo = "tract", state = "GA", year = 2020)
# Impute NDI for tracts (2020) with missing census information (median values)
powell_wiley(state = "tract", "GA", year = 2020, imp = TRUE)
# County-level metric (2020)
powell_wiley(geo = "county", state = "GA", year = 2020)
## End(Not run)
Location Quotient (LQ) based on Merton (1938) and Sudano et al. (2013)
Description
Compute the aspatial Location Quotient (Sudano) of a selected racial/ethnic subgroup(s) and U.S. geographies.
Usage
sudano(
geo_large = "county",
geo_small = "tract",
year = 2020,
subgroup,
omit_NAs = TRUE,
quiet = FALSE,
...
)
Arguments
geo_large |
Character string specifying the larger geographical unit of the data. The default is counties |
geo_small |
Character string specifying the smaller geographical unit of the data. The default is census tracts |
year |
Numeric. The year to compute the estimate. The default is 2020, and the years 2009 onward are currently available. |
subgroup |
Character string specifying the racial/ethnic subgroup(s). See Details for available choices. |
omit_NAs |
Logical. If FALSE, will compute index for a larger geographical unit only if all of its smaller geographical units have values. The default is TRUE. |
quiet |
Logical. If TRUE, will display messages about potential missing census information. The default is FALSE. |
... |
Arguments passed to |
Details
This function will compute the aspatial Location Quotient (LQ) 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 Merton (1939) doi:10.2307/2084686 and Sudano et al. (2013) doi:10.1016/j.healthplace.2012.09.015. This function provides the computation of LQ for any of the U.S. Census Bureau race/ethnicity subgroups (including Hispanic and non-Hispanic individuals).
The function uses the get_acs
function to obtain U.S. Census Bureau 5-year American Community Survey characteristics used for the aspatial computation. The yearly estimates are available for 2009 onward when ACS-5 data are available but are available from other U.S. Census Bureau surveys. The twenty racial/ethnic subgroups (U.S. Census Bureau definitions) are:
-
B03002_002: not Hispanic or Latino
"NHoL"
-
B03002_003: not Hispanic or Latino, white alone
"NHoLW"
-
B03002_004: not Hispanic or Latino, Black or African American alone
"NHoLB"
-
B03002_005: not Hispanic or Latino, American Indian and Alaska Native alone
"NHoLAIAN"
-
B03002_006: not Hispanic or Latino, Asian alone
"NHoLA"
-
B03002_007: not Hispanic or Latino, Native Hawaiian and Other Pacific Islander alone
"NHoLNHOPI"
-
B03002_008: not Hispanic or Latino, Some other race alone
"NHoLSOR"
-
B03002_009: not Hispanic or Latino, Two or more races
"NHoLTOMR"
-
B03002_010: not Hispanic or Latino, Two races including Some other race
"NHoLTRiSOR"
-
B03002_011: not Hispanic or Latino, Two races excluding Some other race, and three or more races
"NHoLTReSOR"
-
B03002_012: Hispanic or Latino
"HoL"
-
B03002_013: Hispanic or Latino, white alone
"HoLW"
-
B03002_014: Hispanic or Latino, Black or African American alone
"HoLB"
-
B03002_015: Hispanic or Latino, American Indian and Alaska Native alone
"HoLAIAN"
-
B03002_016: Hispanic or Latino, Asian alone
"HoLA"
-
B03002_017: Hispanic or Latino, Native Hawaiian and Other Pacific Islander alone
"HoLNHOPI"
-
B03002_018: Hispanic or Latino, Some other race alone
"HoLSOR"
-
B03002_019: Hispanic or Latino, Two or more races
"HoLTOMR"
-
B03002_020: Hispanic or Latino, Two races including Some other race
"HoLTRiSOR"
-
B03002_021: Hispanic or Latino, Two races excluding Some other race, and three or more races
"HoLTReSOR"
Use the internal state
and county
arguments within the get_acs
function to specify geographic extent of the data output.
LQ is some measure of relative racial homogeneity of each smaller geography within a larger geography. LQ can range in value from 0 to infinity because it is ratio of two proportions in which the numerator is the proportion of subgroup population in a smaller geography and the denominator is the proportion of subgroup population in its larger geography. For example, a smaller geography with an LQ of 5 means that the proportion of the subgroup population living in the smaller geography is five times the proportion of the subgroup population in its larger geography.
Larger geographies available include state geo_large = "state"
, county geo_large = "county"
, and census tract geo_large = "tract"
levels. Smaller geographies available include, county geo_small = "county"
, census tract geo_small = "tract"
, and census block group geo_small = "block group"
levels. If a larger geographical area is comprised of only one smaller geographical area (e.g., a U.S county contains only one census tract), then the LQ value returned is NA.
Value
An object of class 'list'. This is a named list with the following components:
lq
An object of class 'tbl' for the GEOID, name, and LQ at specified smaller census geographies.
lq_data
An object of class 'tbl' for the raw census values at specified smaller census geographies.
missing
An object of class 'tbl' of the count and proportion of missingness for each census variable used to compute LQ.
See Also
get_acs
for additional arguments for geographic extent selection (i.e., state
and county
).
Examples
## Not run:
# Wrapped in \dontrun{} because these examples require a Census API key.
# Isolation of non-Hispanic Black populations
## of census tracts within Georgia, U.S.A., counties (2020)
sudano(geo_large = "state", geo_small = "county", state = "GA",
year = 2020, subgroup = "NHoLB")
## End(Not run)
Correlation Ratio based on Bell (1954) and White (1986)
Description
Compute the aspatial Correlation Ratio (White) of a selected racial/ethnic subgroup(s) and U.S. geographies.
Usage
white(
geo_large = "county",
geo_small = "tract",
year = 2020,
subgroup,
omit_NAs = TRUE,
quiet = FALSE,
...
)
Arguments
geo_large |
Character string specifying the larger geographical unit of the data. The default is counties |
geo_small |
Character string specifying the smaller geographical unit of the data. The default is census tracts |
year |
Numeric. The year to compute the estimate. The default is 2020, and the years 2009 onward are currently available. |
subgroup |
Character string specifying the racial/ethnic subgroup(s). See Details for available choices. |
omit_NAs |
Logical. If FALSE, will compute index for a larger geographical unit only if all of its smaller geographical units have values. The default is TRUE. |
quiet |
Logical. If TRUE, will display messages about potential missing census information. The default is FALSE. |
... |
Arguments passed to |
Details
This function will compute the aspatial Correlation Ratio (V or Eta^{2}
) 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 Bell (1954) doi:10.2307/2574118 and White (1986) doi:10.2307/3644339. This function provides the computation of V for any of the U.S. Census Bureau race/ethnicity subgroups (including Hispanic and non-Hispanic individuals).
The function uses the get_acs
function to obtain U.S. Census Bureau 5-year American Community Survey characteristics used for the aspatial computation. The yearly estimates are available for 2009 onward when ACS-5 data are available but are available from other U.S. Census Bureau surveys. The twenty racial/ethnic subgroups (U.S. Census Bureau definitions) are:
-
B03002_002: not Hispanic or Latino
"NHoL"
-
B03002_003: not Hispanic or Latino, white alone
"NHoLW"
-
B03002_004: not Hispanic or Latino, Black or African American alone
"NHoLB"
-
B03002_005: not Hispanic or Latino, American Indian and Alaska Native alone
"NHoLAIAN"
-
B03002_006: not Hispanic or Latino, Asian alone
"NHoLA"
-
B03002_007: not Hispanic or Latino, Native Hawaiian and Other Pacific Islander alone
"NHoLNHOPI"
-
B03002_008: not Hispanic or Latino, Some other race alone
"NHoLSOR"
-
B03002_009: not Hispanic or Latino, Two or more races
"NHoLTOMR"
-
B03002_010: not Hispanic or Latino, Two races including Some other race
"NHoLTRiSOR"
-
B03002_011: not Hispanic or Latino, Two races excluding Some other race, and three or more races
"NHoLTReSOR"
-
B03002_012: Hispanic or Latino
"HoL"
-
B03002_013: Hispanic or Latino, white alone
"HoLW"
-
B03002_014: Hispanic or Latino, Black or African American alone
"HoLB"
-
B03002_015: Hispanic or Latino, American Indian and Alaska Native alone
"HoLAIAN"
-
B03002_016: Hispanic or Latino, Asian alone
"HoLA"
-
B03002_017: Hispanic or Latino, Native Hawaiian and Other Pacific Islander alone
"HoLNHOPI"
-
B03002_018: Hispanic or Latino, Some other race alone
"HoLSOR"
-
B03002_019: Hispanic or Latino, Two or more races
"HoLTOMR"
-
B03002_020: Hispanic or Latino, Two races including Some other race
"HoLTRiSOR"
-
B03002_021: Hispanic or Latino, Two races excluding Some other race, and three or more races
"HoLTReSOR"
Use the internal state
and county
arguments within the get_acs
function to specify geographic extent of the data output.
V removes the asymmetry from the Isolation Index (Bell) by controlling for the effect of population composition. The Isolation Index (Bell) is some measure of the probability that a member of one subgroup(s) will meet or interact with a member of another subgroup(s) with higher values signifying higher probability of interaction (less isolation). V can range in value from 0 to 1.
Larger geographies available include state geo_large = "state"
, county geo_large = "county"
, and census tract geo_large = "tract"
levels. Smaller geographies available include, county geo_small = "county"
, census tract geo_small = "tract"
, and census block group geo_small = "block group"
levels. If a larger geographical area is comprised of only one smaller geographical area (e.g., a U.S county contains only one census tract), then the V value returned is NA.
Value
An object of class 'list'. This is a named list with the following components:
v
An object of class 'tbl' for the GEOID, name, and V at specified larger census geographies.
v_data
An object of class 'tbl' for the raw census values at specified smaller census geographies.
missing
An object of class 'tbl' of the count and proportion of missingness for each census variable used to compute V.
See Also
get_acs
for additional arguments for geographic extent selection (i.e., state
and county
).
Examples
## Not run:
# Wrapped in \dontrun{} because these examples require a Census API key.
# Isolation of non-Hispanic Black populations
## of census tracts within Georgia, U.S.A., counties (2020)
white(geo_large = "county", geo_small = "tract", state = "GA",
year = 2020, subgroup = "NHoLB")
## End(Not run)