The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.
Plots of US maps in R usually lack Alaska and Hawaii. The reason is
plotting takes the literal longitude and latitude coordinates and maps
it to a cartesian x-y coordinate graph. Alaska and Hawaii are very far
from the mainland US when using this so it can be unwieldy to include
them. The usmap
package solves this issue by providing data
frames which have Alaska and Hawaii moved to a convenient spot just to
the bottom left of the contiguous United States.
The raw US map data for counties or states can be obtained for
further manipulation (and joining with data). The default
regions
is "states"
.
FIPS codes are defined in the Federal Information Processing
Standards by the US government. One usage is uniquely identifying US
states and counties (among other things such as identifying countries
for the CIA World Factbook). Downloading datasets from the US Census will often include
FIPS codes as identifiers so it can be helpful to know what a FIPS code
represents. The functions in usmap
are built around the
FIPS code identification system and so convenience methods for accessing
them and performing reverse-lookups have been included.
# Get FIPS code for a state
usmap::fips(state = "MA")
#> [1] "25"
usmap::fips(state = "Massachusetts")
#> [1] "25"
# Get FIPS code for a county
usmap::fips(state = "NJ", county = "Bergen")
#> [1] "34003"
usmap::fips(state = "CA", county = "Orange County")
#> [1] "06059"
# The parameters are NOT case sensitive!
usmap::fips(state = "ca", county = "oRanGe cOUNty")
#> [1] "06059"
If the FIPS code is known and want to see what state/county it
corresponds to, use the reverse lookup function
fips_info
.
More information about FIPS can be read here.
“A map is the greatest of all epic poems. Its lines and colors show the realization of great dreams.” - Gilbert H. Grosvenor, Editor of National Geographic (1903 - 1954)
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.