xwalk_blockgroup2cca | R Documentation |
This table contains a set of factors to apportion Census block group-level
data among Chicago Community Areas (CCAs). Separate factors are provided for
apportioning housing unit, household, and population attributes. All factors
were determined by calculating the percentage of a block group's housing
units, households and population that were located in each of its component
blocks, according to the 2020 Decennial Census, and then assigning each block
to a CCA (based on the location of the block's centroid point). Use
xwalk_blockgroup2cca
for data from the 2020 decennial census or the
American Community Survey (ACS) from 2020 onward. For data from the 2010
decennial census or ACS from 2010 through 2019, use
xwalk_blockgroup2cca_2010
.
xwalk_blockgroup2cca
xwalk_blockgroup2cca_2010
xwalk_blockgroup2cca
is a tibble with 2185 rows
and 6 variables:
Unique 12-digit block group ID, assigned by the Census
Bureau. Corresponds to blockgroup_sf
. Character.
Numeric CCA ID, as assigned by the City of Chicago.
Corresponds to cca_sf
. Integer.
Proportion of the block group's housing units (occupied or vacant) located in the specified CCA. Multiply this by a block group-level measure of a housing attribute (e.g. vacant homes) to estimate the CCA's portion. Double.
Proportion of the block group's households (i.e. occupied housing units) living in the specified CCA. Multiply this by a block group-level measure of a household attribute (e.g. car-free households) to estimate the CCA's portion.Double.
Proportion of the block group's total population (including group quarters) living in the specified CCA. Multiply this by a block group-level measure of a population attribute (e.g. race/ethnicity) to estimate the CCA's portion. Double.
Proportion of the block group's total jobs located in the
specified CCA. Multiply this by a block group-level measure of an
employment attribute (e.g. retail jobs) to estimate the CCA's portion.
Not available in xwalk_blockgroup2cca_2010
. Double.
xwalk_blockgroup2cca_2010
is a tibble with
2180 rows and
5 variables (no emp_pct
).
Generally speaking, block group boundaries align neatly with CCA boundaries as they tend to follow similar features (e.g. rivers, major roads, rail lines) but there are cases where the jobs, population, households and/or housing units in a block group are split across multiple CCAs, or else are partially within the City of Chicago and partially outside of it. For that reason, it is not appropriate to use a one-to-one block group-to-CCA assignment to apportion Census data among CCAs, and this crosswalk should be used instead.
To use this crosswalk effectively, Census data should be joined to it (not
vice versa, since block group IDs appear multiple times in this table). Once
the data is joined, it should be multiplied by the appropriate factor
(depending whether the data of interest is measured at the housing unit,
household, person or job level), and then the result should be summed by CCA.
If calculating rates, this should only be done after the counts have been
summed to CCA. The resulting table can then be joined to cca_sf
for
mapping, if desired.
If your data is only available at the tract level, you can use
xwalk_tract2cca
for a tract-level allocation instead.
suppressPackageStartupMessages(library(dplyr))
# View the block groups with housing units split between multiple CCAs
filter(xwalk_blockgroup2cca, hu_pct < 1)
# Estimate CCA-level housing vacancy rates from block group-level Census data
df_blkgrp <- tidycensus::get_decennial(
geography = "block group", variables = c("H1_001N", "H1_003N"),
year = 2020, state = "IL", county = c("031", "043"), output = "wide"
) %>%
suppressMessages() %>% # Hide tidycensus messages
select(geoid_blkgrp = GEOID, hu_tot = H1_001N, hu_vac = H1_003N)
df_cca <- xwalk_blockgroup2cca %>%
left_join(df_blkgrp, by = "geoid_blkgrp") %>%
mutate(hu_tot = hu_tot * hu_pct,
hu_vac = hu_vac * hu_pct) %>%
group_by(cca_num) %>%
summarize_at(vars(hu_tot, hu_vac), sum) %>%
mutate(vac_rate = hu_vac / hu_tot)
df_cca
# Join to cca_sf for mapping
library(ggplot2)
cca_sf %>%
left_join(df_cca, by = "cca_num") %>%
ggplot() +
geom_sf(aes(fill = vac_rate), lwd = 0.1) +
scale_fill_viridis_c(direction = -1) +
theme_void()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.