Skip to contents

Program Overview

According to (Consolidated Planning/CHAS Data | HUD USER), the United States Department of Housing and Urban Development (HUD) gets custom tabulations of American Community Survey (ACS) data from the United States Census Bureau every year. These figures, dubbed “CHAS” (Comprehensive Housing Affordability Strategy), show the scope of housing issues and needs, particularly among low-income households. Local governments utilize the CHAS data to plan how they will spend HUD monies, and HUD may use the data to distribute grant funds.

Examples

These are basic examples showing you how to query the Comprehensive Housing and Affordability (CHAS) API.

Each geoid query represents a CHAS measurement for that particular geographic resolution. Before looking at the examples I RECOMMEND first looking at [the parameters][Parameters] as well as [return data][Returns] located at the bottom of the page. (^ Currently a work in progress ^)

The functions below are the main functions for querying the CHAS API at different geographic resolutions. The package also contains an omni function which encapsulates the capabilities of all the main function calls below – omni-function

  1. nation
  2. state
  3. county
  4. mcd
  5. place

Comprehensive Housing and Affordability Strategy for Nation

  library(rhud)
  hud_chas_nation(year=c("2014-2018"))

Comprehensive Housing and Affordability Strategy for States

  # Queries for CHAS in a state
  hud_chas_state("Maryland", year=c("2012-2016"))

Comprehensive Housing and Affordability Strategy for County

  # Queries a county in Virginia
  hud_chas_county("51999", year=c("2014-2018"))

Comprehensive Housing and Affordability Strategy for MCD

  # Queries for CHAS for all mcds in Virginia
  hud_chas_state_mcd("VA", year=c("2014-2018"))

Comprehensive Housing and Affordability Strategy for Place

  # Queries for CHAS for all places in state fips code 51.
  hud_chas_state_place("51", year=c("2014-2018"))

Using the omni function for querying

The omni function requires specifying the type which can be from 1-12. The type argument follows the number scheme described at [Input Arguments][]. You also must use the ‘query’ argument for inputting geoids instead of the specific geoid names (i.e county = 22031, cd = 7200) used by the other functions.

The input arguments for the omni function closely follow the API arguments provided by HUD USER. Please type in ‘?hud_chas’ into your terminal to get more details on how to use this.

hud_chas(type = 1)

hud_chas(type = 2, 51)

Querying for Geographic Identifers

US Counties

This is an example to show you how to query for all counties in MD, Virginia, and California, respectively.

US Minor Civil Divisions

This is an example to show you how to query for minor civil divisions in Virginia and California.

US Places

This is an example to show you how to query for places in Wyoming and Michigan

hud_state_places(c("VA", "CA"))

References

“Consolidated Planning/CHAS Data | HUD USER.” www.huduser.gov,
     www.huduser.gov/portal/datasets/cp.html.