fips: Retrieve FIPS code for either a US state or county
Description
Each US state and county has a unique FIPS
(Federal Information Processing Standards) code. Use
this function to obtain the FIPS code for a state or
county.
Usage
fips(state, county = "")
Arguments
state
The state for which to obtain a FIPS code.
Can be entered as either a state abbrevation or full name (case-insensitive).
county
The county for which to obtain a FIPS code.
Can be entered with or without "county" (case-insensitive).
Value
The FIPS code of given state or county.
Details
State and county FIPS (Federal Information Processing Standards) are
two and five digit codes, respectively. They uniquely identify all states and
counties within the United States. The first two digits of the five digit county
codes correspond to the state that the county belongs to. FIPS codes also exist
for US territories and minor outlying islands, though this package only provides
information for the 50 US states (and their associated counties and
census designated areas).
# NOT RUN {fips("NJ")
fips("California")
fips("CA", county = "orange")
fips(state = "AL", county = "autauga")
fips(state = "Alabama", county = "Autauga County")
# }