make_block_xwalk()
joined U.S. Census blocks data from tigris::blocks()
to a data frame from tigris::tracts()
to provide a crosswalk between both
geographies. If year = 2020
, the suffix parameter is not used. If year is
any other year than 2020, the by parameter must be changed from the default
value of c("TRACTCE20" = "TRACTCE")
. 2020 is also the only year where
tigris::blocks()
includes the population and household count data required
to use this crosswalk data frame with make_area_xwalk()
.
Arguments
- state
The two-digit FIPS code (string) of the state you want. Can also be state name or state abbreviation.
- county
The three-digit FIPS code (string) of the county you'd like to subset for, or a vector of FIPS codes if you desire multiple counties. Can also be a county name or vector of names.
- year
the data year; defaults to 2021
- by
Specification of join variables in the format of c("block column name for tract" = "tract column name"). Passed to
dplyr::left_join()
.- keep_zipped_shapefile
Passed to
tigris::blocks()
andtigris::tracts()
to keep and re-use the zipped shapefile.- suffix
Suffixes added to the output to disambiguate column names from the block and tract data. Unused for 2020 data.
- crs
Coordinate reference system to return.
- ...
Arguments passed on to
tigris::blocks