I want to draw the outline of multiple US states in R using longitude and latitude points. Now I can only draw the outline of each states, so I want to know the way to draw the outline of multiple US states(only the outer line).
library(tidyverse)
library(knitr)
library(broom)
library(stringr)
library(modelr)
library(forcats)
library(ggmap)
states <- map_data("state")# %>% as_tibble()
counties <- map_data("county")
il_df <- filter(fifty_states, id == "illinois")
midwest <- subset(fifty_states, id %in% c("illinois", "indiana", "iowa",
"kansas", "michigan", "minnesota",
"missouri", "nebraska", "north dakota",
"ohio", "south dakota", "wisconsin"))
il_mid <- ggplot(data = midwest, mapping = aes(x = long, y = lat, group = group)) +
coord_fixed(1.3) +
geom_polygon(color = "black", fill = "gray")
il_mid
I want to know how to draw the pink line in below image.