Skip to contents

Given cbsadiv(s) and zip(s), determine if they overlap using the (United States Postal Service) USPS Crosswalk files. Overlap will be described if any residential, business, other, or total addresses reside in both.

Usage

cbsadiv_in_z(cbsadiv, zip, year, quarter, key = Sys.getenv("HUD_KEY"))

Arguments

cbsadiv

A character or numeric vector: the cbsadiv(s) to determine overlap with zip(s).

zip

A character or numeric vector: the zip(s) to determine overlap with cbsadiv(s).

year

A character or numeric vector: gets the year that this data was recorded. Can specify multiple years. Default is the previous year.

quarter

A character or numeric vector: gets the quarter of the year that this data was recorded. Defaults to the first quarter of the year.

key

A character vector of length one: the API key for this user. You must go to HUD and sign up for an account and request for an API key.

Value

If cbsadiv(s) exist in the zip(s) specified, then TRUE is returned.

Examples

if (FALSE) {

cbsadiv_in_z(cbsadiv = 43340, zip = 71052, year = 2017, quarter = 4)

}