View source: R/hud_decomp_crosswalk.R
hud_cw_cd_zip | R Documentation |
This function queries the USPS Crosswalks API provided by US Department of Housing and Urban Development (HUD USER). This returns the crosswalk for cd to zip.
hud_cw_cd_zip( cd, year = format(Sys.Date() - 365, "%Y"), quarter = 1, minimal = FALSE, key = Sys.getenv("HUD_KEY"), to_tibble = getOption("rhud_use_tibble", FALSE) )
cd |
A character or numeric vector: 4 digit congressional district code. |
year |
A character or numeric vector: gets the year that this data was recorded. Can specify multiple years. Default is the previous year. |
quarter |
A character or numeric vector: gets the quarter of the year that this data was recorded. Defaults to the first quarter of the year. |
minimal |
A logical: return just the crosswalked geoids if TRUE. Otherwise, return all fields. This does not remove duplicates. |
key |
A character vector of length one with the key obtained from HUD (US Department of Housing and Urban Development) USER website. |
to_tibble |
A logical: if TRUE, return the data in a tibble format rather than a data frame. |
This function returns a dataframe containing crosswalk data for cd to zip for all combinations of "cd", "year", and "quarter" inputs.
These measurements include res-ratio, bus-ratio, oth-ratio, tot-ratio. For more details on these measurements, visit https://www.huduser.gov/portal/dataset/uspszip-api.html
hud_cw_zip_tract()
hud_cw_zip_county()
hud_cw_zip_cbsa()
hud_cw_zip_cbsadiv()
hud_cw_zip_countysub()
hud_cw_zip_cd()
hud_cw_tract_zip()
hud_cw_county_zip()
hud_cw_cbsa_zip()
hud_cw_cbsadiv_zip()
hud_cw_cd_zip()
hud_cw_countysub_zip()
hud_cw()
## Not run: hud_cw_cd_zip(cd = 2202, year = c('2017'), quarter = c('1')) hud_cw_cd_zip(cd = '2202', year = c('2010'), quarter = c('1'), minimal = TRUE) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.