The USAboundaries package provides an R wrapper around the boundary data for the United States of America in the Atlas of Historical County Boundaries from the Dr. William M. Scholl Center for American History and Culture at the Newberry Library. This package provides lower resolution shapefiles; for higher resolutions, see the original project page.
library(USAboundaries)
library(maptools)
library(sp)
library(ggplot2)
You can return either states (the default) or counties. This plot shows the states in 1844.
us_1844 <- us_boundaries(as.Date("1844-07-04"))
plot(us_1844)
This plot shows the counties in Virginia in 1844.
va_1844 <- us_boundaries(as.Date("1844-07-04"), states = "Virginia",
type = "county")
plot(va_1844)
By default object returned is of class sp
from the sp package. You can also return a data frame suitable for plotting in ggplot2.
us_1790 <- us_boundaries(as.Date("1790-07-04"), format = "df")
ggplot(data = us_1790) +
geom_map(map = us_1790,
aes(x = long, y = lat, group = group, map_id = id),
fill = "white", color = "black", size = 0.2) +
theme_minimal()
See the documentation for the us_boundaries()
function for more information.