zi_load_labels {zippeR} | R Documentation |
Load Label Data
Description
This function loads a specific label data set that can be used to label five or three-digit ZIP codes in a data frame.
Usage
zi_load_labels(source = "UDS", type = "zip5", include_scf = FALSE,
vintage = 2022)
Arguments
source |
A required character scalar; specifies the source of the label
data. The only supported sources are |
type |
A required character scalar; one of either |
include_scf |
A logical scalar required when |
vintage |
A required character or numeric scalar; specifying the date
for |
Details
Labels are approximations of the actual location of a ZIP Code. For five-digit ZIP Codes, the city and state may or may not correspond to an individuals' mailing address city (since multiple cities may be accepted as valid by USPS for a particular ZIP Code) or state (since ZIP Codes may cross state lines).
For three-digit ZIP Codes, the area and state may or may not correspond to
an individuals' mailing address state (since SCFs cover multiple states).
For example, the three digit ZIP Code 010
covers Western Massachusetts
in practice, but is assigned to the state of Connecticut.
Value
A tibble with the specified label data for either five or three-digit ZIP Codes.
Examples
# zip5 labels via UDS
zi_load_labels(source = "UDS", type = "zip5", vintage = 2022)
# zip3 labels via USPS
zi_load_labels(source = "USPS", type = "zip3", vintage = 202408)