fips_to_abbr: Get state abbreviations from FIPS codes

View source: R/utils.R

fips_to_abbrR Documentation

Get state abbreviations from FIPS codes

Description

Look up state abbreviations by FIPS codes (including District of Columbia and Puerto Rico). Will match the first two digits of the input codes, so should work for 5-digit county codes, or even longer tract and census block FIPS codes.

Usage

fips_to_abbr(code)

Arguments

code

Vector of FIPS codes to look up; will match the first two digits of the code. Note that these are treated as strings; the number 1 will not match "01".

Value

A vector of state abbreviations.

See Also

abbr_to_fips()

Examples

fips_to_abbr("42000")
fips_to_abbr(c("42", "72", "11"))


covidcast documentation built on Oct. 7, 2022, 1:06 a.m.