Last active
June 1, 2018 17:45
-
-
Save hafen/6e4aaad6ca91bf7b30303ad7f5ebc3c5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(geofacet) | |
# get Connecticut county boundaries from USAboundaries package | |
counties <- USAboundaries::us_counties(states = "connecticut") | |
# convert to SpatialPolygonsDataFrame | |
# (will be more tolerant of different spatial types in the future) | |
counties <- as(counties, "Spatial") | |
# remove unneeded columns | |
counties@data <- counties@data[, c("countyfp", "name")] | |
# this gives a good initial approximation | |
grd <- grid_auto(counties, seed = 1234) | |
# this allows further tweaking and submission | |
grid_design(grd, label = "name") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment