get_zctas_by_county {zctaCrosswalk}R Documentation

Return the ZCTAs in a vector of counties

Description

Given a vector of counties, return the ZIP Code Tabulation Areas (ZCTAs) in those counties. Note counties must be identified by FIPS code (character or numeric) in this function because county names are not unique between states. For example, 30 states have a county named "Washington".

Usage

get_zctas_by_county(counties)

Arguments

counties

A vector of Counties. Must be by FIPS code (numeric or character).

Value

A vector, where each element is a ZCTA in the requested county.

Examples

# "06075" is San Francisco County, California
get_zctas_by_county("06075")

# 6075 (== as.numeric("06075")) works too
get_zctas_by_county(6075)

# Multiple counties at the same time are also OK
get_zctas_by_county(c("06075", "36059"))


[Package zctaCrosswalk version 2.0.0 Index]