diff --git a/vignettes/vignette.Rmd b/vignettes/vignette.Rmd index ed2daa8..463adf0 100644 --- a/vignettes/vignette.Rmd +++ b/vignettes/vignette.Rmd @@ -1547,7 +1547,7 @@ Compute the aspatial racial/ethnic _xPx\*_ values (2015-2019 5-year ACS) for Del | 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 | -_xPy\*_ 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) when comparing smaller geographical areas to larger ones within which the smaller geographical areas are located. _xPy\*_ can range in value from 0 to 1. +_xPx\*_ 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) when comparing smaller geographical areas to larger ones within which the smaller geographical areas are located. _xPx\*_ can range in value from 0 to 1. ```{r lieberson_prep, results = 'hide'} lieberson2021DE <- lieberson( @@ -1559,14 +1559,14 @@ lieberson2021DE <- lieberson( ) # Obtain the 2021 census counties from the 'tigris' package -county2021DE <- counties(state = 'DE', year = 2019, cb = TRUE) +tract2021DE <- tracts(state = 'DE', year = 2019, cb = TRUE) # Join the xPx* values to the county geometry -DE2021lieberson <- county2021DE %>% +DE2021lieberson <- tract2021DE %>% left_join(lieberson2021DE$xpx_star, by = 'GEOID') ``` -```{r lieberson_plot, fig.height = 6, fig.width = 7} +```{r lieberson_plot, fig.height = 9, fig.width = 7} # Visualize the xPx* values (2015-2019 5-year ACS) for Delaware, U.S.A., census tracts ggplot() + geom_sf( @@ -1576,7 +1576,7 @@ ggplot() + color = 'white' ) + geom_sf( - data = county2021DE, + data = tract2021DE, fill = 'transparent', color = 'white', size = 0.2 @@ -1585,7 +1585,7 @@ ggplot() + scale_fill_viridis_c(limits = c(0, 1)) + labs(fill = 'Index (Continuous)', caption = 'Source: U.S. Census ACS 2015-2019 estimates') + ggtitle( - 'Isolation Index (Lieberson)\nDelaware census tracts to counties', + 'Isolation Index (Lieberson)\nDelaware census block groups to census tracts', subtitle = 'Black non-Hispanic' ) ``` diff --git a/vignettes/vignette.html b/vignettes/vignette.html index eb50ec3..96b983c 100644 --- a/vignettes/vignette.html +++ b/vignettes/vignette.html @@ -12,7 +12,7 @@ - +
The process to compute a US-standardized NDI (Powell-Wiley) -took about 2.8 minutes to run on a machine with the features listed at +took about 24.7 minutes to run on a machine with the features listed at the end of the vignette.
@@ -1160,13 +1160,13 @@duncan()
function that computes the Dissimilarity Index
-(DI) based on Duncan
+(D) based on Duncan
& Duncan (1955)atkinson()
function that computes the Atkinson Index
-(AI) based on Atkinson
+(A) based on Atkinson
(1970)bell()
function that computes the aspatial
-racial/ethnic Isolation Index (II) based on Shevky &
+racial/ethnic Interaction Index (xPy*) based on Shevky &
Williams (1949; ISBN-13:978-0-837-15637-8) and Bell (1954)white()
function that computes the aspatial
racial/ethnic Correlation Ratio (V) based on Bell (1954) and White (1986)white_blau()
function that computes an index of spatial
proximity (SP) based on White (1986) and Blau (1977;
ISBN-13:978-0-029-03660-0)lieberson()
function that computes the aspatial
+racial/ethnic Isolation Index (xPx*) based on Lieberson (1981;
+ISBN-13:978-1-032-53884-6) and Bell (1954)# Visualize the Gini Index values (2006-2010 5-year ACS) for Massachusetts, U.S.A., census tracts
+ left_join(gini2010MA$g, by = 'GEOID')
# Visualize the G (Gini) values (2006-2010 5-year ACS) for Massachusetts, U.S.A., census tracts
ggplot() +
geom_sf(
data = MA2010gini,
- aes(fill = gini),
+ aes(fill = G),
size = 0.05,
color = 'transparent'
) +
@@ -1735,9 +1738,9 @@ Index of Concentration at the Extremes (ICE)
subtitle = 'white non-Hispanic (WNH) in 80th inc pctl vs. WNH in 20th inc pctl'
)
Compute the aspatial racial/ethnic DI values (2006-2010 +
Compute the aspatial racial/ethnic D values (2006-2010 5-year ACS) for Pennsylvania, U.S.A., counties from census tracts. This metric is based on Duncan & Duncan (1955) that assessed the racial/ethnic isolation of @@ -1867,9 +1870,9 @@
DI is a measure of the evenness of racial/ethnic residential +
D 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 +within which the smaller geographical areas are located. D 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 @@ -1888,14 +1891,14 @@
Compute the aspatial income or racial/ethnic AI values +(A) +
Compute the aspatial income or racial/ethnic A values (2017-2021 5-year ACS) for Kentucky, U.S.A., counties from census block groups. This metric is based on Atkinson (1970) that assessed the distribution of income within 12 counties but has since been adapted @@ -2046,13 +2049,13 @@
AI is a measure of the inequality and, in the context of +
A is a measure of the inequality and, in the context of residential race/ethnicity, segregation when comparing smaller geographical areas to larger ones within which the smaller geographical -areas are located. AI can range in value from 0 to 1 and -smaller values of the index indicate lower levels of inequality (e.g., -less segregation).
-AI is sensitive to the choice of epsilon
+areas are located. A can range in value from 0 to 1 and smaller
+values of the index indicate lower levels of inequality (e.g., less
+segregation).
A is sensitive to the choice of epsilon
argument or the shape parameter that determines how to weight the
increments to inequality (segregation) contributed by different
proportions of the Lorenz curve. A user must explicitly decide how
@@ -2084,14 +2087,14 @@
Compute the aspatial racial/ethnic II values (2017-2021
-5-year ACS) for Ohio, U.S.A., counties from census block groups. This
-metric is based on Shevky & Williams (1949;
-ISBN-13:978-0-837-15637-8) and adapted by Bell (1954). Multiple
-racial/ethnic subgroups are available in the bell()
-function, including:
Compute the aspatial racial/ethnic xPy* values (2017-2021
+5-year ACS) for Ohio, U.S.A., counties from census tracts. This metric
+is based on Shevky & Williams (1949; ISBN-13:978-0-837-15637-8) and
+adapted by Bell (1954).
+Multiple racial/ethnic subgroups are available in the
+bell()
function, including:
ACS table source | racial/ethnic subgroup | -character for subgroup or or subgroup_ref
+ | character for subgroup or subgroup_ixn
argument |
---|
II is some measure of the probability that a member of one +
xPy* 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) when comparing smaller geographical areas to larger ones -within which the smaller geographical areas are located. II can -range in value from 0 to 1.
+within which the smaller geographical areas are located. xPy* +can range in value from 0 to 1.bell2021OH <- bell(
geo_large = 'county',
geo_small = 'tract',
@@ -2257,14 +2260,14 @@ Compute racial/ethnic Isolation Index (II)
# Obtain the 2021 census counties from the 'tigris' package
county2021OH <- counties(state = 'OH', year = 2021, cb = TRUE)
-# Join the II values to the county geometry
+# Join the xPy* values to the county geometry
OH2021bell <- county2021OH %>%
- left_join(bell2021OH$ii, by = 'GEOID')
# Visualize the II values (2017-2021 5-year ACS) for Ohio, U.S.A., counties
+ left_join(bell2021OH$xpy_star, by = 'GEOID')
# Visualize the xPy* values (2017-2021 5-year ACS) for Ohio, U.S.A., counties
ggplot() +
geom_sf(
data = OH2021bell,
- aes(fill = II),
+ aes(fill = xPy_star),
size = 0.05,
color = 'white'
) +
@@ -2278,10 +2281,10 @@ Compute racial/ethnic Isolation Index (II)
scale_fill_viridis_c(limits = c(0, 1)) +
labs(fill = 'Index (Continuous)', caption = 'Source: U.S. Census ACS 2017-2021 estimates') +
ggtitle(
- 'Isolation Index (Bell)\nOhio census tracts to counties',
+ 'Interaction Index (Bell)\nOhio census tracts to counties',
subtitle = 'Black non-Hispanic vs. white non-Hispanic'
)
white2021SC <- white(
geo_large = 'county',
geo_small = 'tract',
@@ -2448,13 +2451,18 @@ Compute Correlation Ratio (V)
size = 0.2
) +
theme_minimal() +
- scale_fill_viridis_c() +
- labs(fill = 'Index (Continuous)', caption = 'Source: U.S. Census ACS 2017-2021 estimates') +
- ggtitle(
- 'Correlation Ratio (White)\nSouth Carolina census tracts to counties',
- subtitle = 'Black non-Hispanic'
- )
subgroup
argumentsubgroup
or subgroup_ixn
+argumentCompute the aspatial racial/ethnic xPx* values (2015-2019
+5-year ACS) for Delaware, U.S.A., census tracts from census block
+groups. This metric is based on Bell (1954) and adapted by
+Lieberson (1981; ISBN-13:978-1-032-53884-6). Multiple racial/ethnic
+subgroups are available in the lieberson()
function,
+including:
ACS table source | +racial/ethnic subgroup | +character for subgroup argument |
+
---|---|---|
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 | +
xPx* 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) when comparing smaller geographical areas to larger ones +within which the smaller geographical areas are located. xPx* +can range in value from 0 to 1.
+lieberson2021DE <- lieberson(
+ geo_large = 'tract',
+ geo_small = 'block group',
+ state = 'DE',
+ year = 2019,
+ subgroup = 'NHoLB'
+)
+
+# Obtain the 2021 census counties from the 'tigris' package
+tract2021DE <- tracts(state = 'DE', year = 2019, cb = TRUE)
+
+# Join the xPx* values to the county geometry
+DE2021lieberson <- tract2021DE %>%
+ left_join(lieberson2021DE$xpx_star, by = 'GEOID')
# Visualize the xPx* values (2015-2019 5-year ACS) for Delaware, U.S.A., census tracts
+ggplot() +
+ geom_sf(
+ data = DE2021lieberson,
+ aes(fill = xPx_star),
+ size = 0.05,
+ color = 'white'
+ ) +
+ geom_sf(
+ data = tract2021DE,
+ fill = 'transparent',
+ color = 'white',
+ size = 0.2
+ ) +
+ theme_minimal() +
+ scale_fill_viridis_c(limits = c(0, 1)) +
+ labs(fill = 'Index (Continuous)', caption = 'Source: U.S. Census ACS 2015-2019 estimates') +
+ ggtitle(
+ 'Isolation Index (Lieberson)\nDelaware census block groups to census tracts',
+ subtitle = 'Black non-Hispanic'
+ )
## R version 4.4.1 (2024-06-14 ucrt)
## Platform: x86_64-w64-mingw32/x64
## Running under: Windows 10 x64 (build 19045)
@@ -3224,7 +3404,7 @@ Compute an index of spatial proximity (SP)
## [1] stats graphics grDevices utils datasets methods base
##
## other attached packages:
-## [1] tigris_2.1 tidycensus_1.6.5 sf_1.0-16 ndi_0.1.6.9000
+## [1] tigris_2.1 tidycensus_1.6.5 sf_1.0-16 ndi_0.1.6.9002
## [5] ggplot2_3.5.1 dplyr_1.1.4 knitr_1.48
##
## loaded via a namespace (and not attached):