geom_map() does the job of remembering the polygons in the data frame for you.
Alex is right that map should look like a fortified feature. It does "memorization." map_id can be any column that contains an identifier for other layers.
Your first call to geom_map() should (usually) be a βbase layerβ, similar to what you are doing with a full-featured GIS program that has polygon outlines and possibly a base fill.
Other calls to geom_map() may add other aesthetics (including other shapefiles).
Here are some examples to demonstrate.
library(ggplot2) library(maptools) library(mapdata) library(ggthemes) library(tibble) library(viridis) us <- map_data("state") choro_dat <- data_frame(some_other_name=unique(us$region), some_critical_value=sample(10000, length(some_other_name))) gg <- ggplot() gg <- gg + geom_map(data=us, map=us, aes(long, lat, map_id=region), color="#2b2b2b", fill=NA, size=0.15) gg <- gg + coord_map("polyconic") gg <- gg + theme_map() gg <- gg + theme(plot.margin=margin(20,20,20,20)) gg

county <- map_data("county") gg <- ggplot() gg <- gg + geom_map(data=county, map=county, aes(long, lat, map_id=region), color="#2b2b2b", fill=NA, size=0.15) gg <- gg + coord_map("polyconic") gg <- gg + theme_map() gg <- gg + theme(plot.margin=margin(20,20,20,20)) gg

The reason for the strange county maps is that the county names are not unique.
gg <- ggplot() gg <- gg + geom_map(data=county, map=county, aes(long, lat, map_id=subregion), color="#2b2b2b", fill=NA, size=0.15) gg <- gg + coord_map("polyconic") gg <- gg + theme_map() gg <- gg + theme(plot.margin=margin(20,20,20,20)) gg

Note that map_id not a region or id , but it still works. What the 'b / c values ββin this column are in us$region .
gg <- ggplot() gg <- gg + geom_map(data=us, map=us, aes(long, lat, map_id=region), color="#2b2b2b", fill=NA, size=0.15) gg <- gg + geom_map(data=choro_dat, map=us, aes(fill=some_critical_value, map_id=some_other_name), color="white", size=0.15) gg <- gg + scale_fill_viridis(name="Value") gg <- gg + coord_map("polyconic") gg <- gg + theme_map() gg <- gg + theme(plot.margin=margin(20,20,20,20)) gg <- gg + theme(legend.position=c(0.85, 0.2)) gg

Please note that we can use different features and wrap a path around our map:
outline <- map_data("usa") gg <- gg + geom_map(data=outline, map=outline, aes(long, lat, map_id=region), color="black", fill=NA, size=1) gg

One last one: a composite using three features located one above the other. Note that you want to use something like this if you really want to display the counties, as it has FIPS codes (that is, a unique identifier for each county can display aesthetics).
state <- map_data("state") county <- map_data("county") usa <- map_data("usa") gg <- ggplot() gg <- gg + geom_map(data=county, map=county, aes(long, lat, map_id=region), color="#2b2b2b", fill=NA, size=0.15) gg <- gg + geom_map(data=state, map=state, aes(long, lat, map_id=region), color="#2166ac", fill=NA, size=0.5) gg <- gg + geom_map(data=usa, map=usa, aes(long, lat, map_id=region), color="#4d9221", fill=NA, size=1) gg <- gg + coord_map("polyconic") gg <- gg + theme_map() gg <- gg + theme(plot.margin=margin(20,20,20,20)) gg
