Search ZIP codes for a county

search_county(county_name, state_abb, ...)

Arguments

county_name

Name of a county within a U.S. state

state_abb

Two-digit code for a U.S. state

...

if the parameter similar = TRUE, then send the parameter max.distance to the base function agrep. Default is 0.1.

Value

tibble of all ZIP codes for given county name

Examples

middlesex <- search_county('Middlesex','NJ')
#> [1] "47 ZIP codes found for Middlesex County , NJ"
alameda <- search_county('alameda','CA')
#> [1] "70 ZIP codes found for Alameda County , CA"
search_county("ST BERNARD","LA", similar = TRUE)$zipcode
#> [1] "6 ZIP codes found for St. Bernard Parish , LA or St Bernard Parish , LA"
#> [1] "70032" "70043" "70044" "70075" "70085" "70092"