statesmaps.Rd
Maps of states: polygons and hexagons
statesmaps
A data frame of 51 states and 8 variables:
Name of the state
two-letter abbrevation of state
character value of the fips code
integer value enumerating different pieces of a state's area
TRUE/FALSE - does the polygon describe a hole?
id for the corresponding polygon piece
list of data frames with polygon points
list of data frames with hexagon points
hexbin map: https://raw.githubusercontent.com/holtzy/D3-graph-gallery/master/DATA/us_states_hexgrid.geojson.json; states map from https://github.com/UrbanInstitute/urbnmapr
library(ggplot2)
library(tidyr)
statesmaps %>% unnest(col=hexagon) %>%
ggplot(aes( x = long, y = lat, group = group, fill=state_name)) +
geom_polygon() +
theme_void () +
coord_map () +
theme(legend.position="none")
statesmaps %>% unnest(col=polygon) %>%
ggplot(aes( x = long, y = lat, group = group, fill=state_name)) +
geom_polygon() +
theme_void () +
coord_map () +
theme(legend.position="none")