hud_il: Omni-Query for HUD US Income Limits API

View source: R/hud_omni_functions.R

hud_ilR Documentation

Omni-Query for HUD US Income Limits API

Description

This function queries the Income Limits API provided by US Department of Housing and Urban Development (HUD USER).

Usage

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

Arguments

query

Querying a state provides the Income Limits measurement for that state level resolution. Querying a county or cbsa will provide data at a county and cbsa resolution, respectively.

year

Gets the year that this data was recorded. Can specify multiple years. Default is the previous year.

key

The key obtained from HUD (US Department of Housing and Urban Development) USER website.

to_tibble

If TRUE, return the data in a tibble format rather than a data frame.

Value

This function returns a dataframe or tibble containing Income Limits data for a particular county, metroarea, or state. Data is returned at the level of the queried geoid.

These measurements include the county_name, counties_msa, town_name, metro_status, metro_name, year, median_income, very_low+, extremely_low+, and low+. For more details about these measurements, go to https://www.huduser.gov/portal/dataset/fmr-api.html

See Also

  • hud_fmr_state_metroareas()

  • hud_fmr_state_counties()

  • hud_fmr_metroarea_zip()

  • hud_fmr_county_zip()

  • hud_fmr()

Examples

## Not run: 

hud_il("VA", year=c(2021))

hud_il("5100199999", year=c(2021))

hud_il("METRO47900M47900", year=c(2018))

## End(Not run)

etam4260/rhud documentation built on Nov. 12, 2022, 2:53 a.m.