Skip to contents

This function queries for state(s) and returns the (Fair Markets Rent) FMR calculation at a county resolution for all counties in state input.

Usage

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

Arguments

state

A character or numeric vector: the state(s) to query for. Can be abbreviation(s), fip code(s), or full name(s).

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 counties in states for all combinations of "state" and "year" inputs.

Examples

if (FALSE) {
hud_fmr_state_counties("VA", year = c(2021))

hud_fmr_state_counties("Alabama", year = c(2021))

hud_fmr_state_counties("24", year = c(2021))
}