fips_info {usmap} | R Documentation |
Retrieve states or counties using FIPS codes
Description
Retrieve states or counties using FIPS codes
Usage
fips_info(fips, sortAndRemoveDuplicates = FALSE, data_year = NULL)
## S3 method for class 'numeric'
fips_info(fips, sortAndRemoveDuplicates = FALSE, data_year = NULL)
## S3 method for class 'character'
fips_info(fips, sortAndRemoveDuplicates = FALSE, data_year = NULL)
Arguments
fips |
A one to five digit, either |
sortAndRemoveDuplicates |
Whether or not to sort the output and remove
duplicates. By default, the output will be returned in the order of
the values provided to the |
data_year |
The year for which to obtain FIPS data. If the value is NULL, the most recent year's data is used. If the provided year is not found from the available map data sets, the next most recent year's data is used. The default is NULL, i.e. the most recent available year is used. |
Value
A data frame with the states or counties and the associated FIPS codes.
If fips
is omitted, the data frame containing all available states is
returned.
See Also
Examples
fips_info(2)
fips_info("2")
fips_info(c("02", "03", "04"))
fips_info(2016)
fips_info(c("02016", "02017"), sortAndRemoveDuplicates = TRUE)