# 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)
Run the code above in your browser using DataLab