zi_prep_hud {zippeR} | R Documentation |
Convert HUD Crosswalk Data to Finalized Crosswalk
Description
The output from zi_load_crosswalk()
for HUD data requires
additional processing to be used in the zi_crosswalk()
function.
This function prepares the HUD data for use in joins.
Usage
zi_prep_hud(.data, by, return_max = TRUE)
Arguments
.data |
The output from |
by |
Character scalar; the column name to use for identifying the best
match for a given ZIP Code. This could be either |
return_max |
Logical scalar; if |
Value
A tibble that has been further prepared for use as a crosswalk.
Examples
# load sample crosswalk data
mo_xwalk <- zi_mo_hud
# the above data can be replicated with the following code:
# zi_load_crosswalk(zip_source = "HUD", year = 2023, qtr = 1,
# target = "COUNTY", query = "MO")
# prep crosswalk
# when a ZIP Code crosses county boundaries, the portion with the largest
# number of residential addresses will be returned
zi_prep_hud(mo_xwalk, by = "residential", return_max = TRUE)