US_stateConversion | R Documentation |
Converts a vector of US state names or codes from one system to
another reuturning NA
where no match is found.
US_stateCodeToName(stateCode = NULL)
US_stateCodeToFIPS(stateCode = NULL)
US_stateFIPSToName(stateFIPS = NULL)
US_stateFIPSToCode(stateFIPS = NULL)
US_stateNameToCode(stateName = NULL)
US_stateNameToFIPS(stateName = NULL)
stateCode |
Vector of ISO 3166-2 alpha-2 codes. |
stateFIPS |
Vector of two-digit FIPS codes. |
stateName |
Vector of English language state names. |
A vector of US state names or codes.
library(MazamaSpatialUtils)
US_stateNameToCode("Washington")
US_stateNameToFIPS("Washington")
postalCodes <- sample(US_stateCodes$stateCode, 30)
data.frame(
name = US_stateCodeToName(postalCodes),
code = postalCodes,
FIPS = US_stateCodeToFIPS(postalCodes)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.