Skip to contents

Returns Comprehensive Housing and Affordability Strategy (CHAS)

Usage

hud_chas_county(
  county,
  year = c("2014-2018"),
  key = Sys.getenv("HUD_KEY"),
  to_tibble = getOption("rhud_use_tibble", FALSE)
)

Arguments

county

A character or numeric vector: the county(s) to query for. Must supply a geoid. 2 digit state fip

  • 3 digit county fip. hud_state_counties() will show an extra 99999 at the end. Just remove that.

year

The years to query for.

  • year = "2014-2018"

  • year = "2013-2017"

  • year = "2012-2016"

  • year = "2011-2015"

  • year = "2010-2014"

  • year = "2009-2013"

  • year = "2008-2012"

  • year = "2007-2011"

  • year = "2006-2010"

key

A character vector of length 1: 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

Returns a data frame with Comprehensive Housing and Affordability Strategy (CHAS) data for counties for all combinations of "county" and "year" inputs.

Examples

if (FALSE) {

hud_chas_county(county = c("06105", "06113"))

}