Skip to contents

This function queries for metroarea(s) and returns FMR calculation. If the metroarea is not a small area, it will return only single measurement for that metroarea. If the metrarea is considered a small area, it will return data at a zip code level.

Usage

hud_fmr_metroarea_zip(
  metroarea,
  year = format(Sys.Date() - 365, "%Y"),
  key = Sys.getenv("HUD_KEY"),
  to_tibble = getOption("rhud_use_tibble", FALSE)
)

Arguments

metroarea

A character vector: metroarea(s) to query for.

year

A character of numeric vector: gets the year that this data was recorded. Can specify multiple year(s). Default is the previous year.

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.

Value

A data frame with fair markets rent for zip codes in metro areas for all combinations of "metroarea" and "year" inputs.

Examples

if (FALSE) {
hud_fmr_metroarea_zip("METRO47900M47900", year = c(2018))

hud_fmr_metroarea_zip("METRO29180N22001", year = c(2019))

hud_fmr_metroarea_zip("METRO10380M10380", year = c(2020))
}