I would like to plot a world map where the U.S. is divided into two regions:
blue_states <- tolower(c("California", "Illinois", "New York", "New Jersey", "Washington", "Massachusetts", "Oregon", "Connecticut", "Delaware", "Rhode Island", "District of Columbia", "Vermont"))
and non_blue_states
.
Crucially, I don't want to display U.S. states' boundaries (except the boundaries between the two regions).
I have a dataframe with two columns: country
and value
, with values between -1 and +1. The map should be colored according to value
. The variable country
spans all countries except the U.S., which is covered by country
= Blue USA
and Non-Blue USA
.
I have found several related questions, but I am not able to make them work. For example, this one uses the package USAboundaries
, which has been removed from CRAN, and this one plots only the U.S., not the whole world.
Ideally, I would like to use the map ggplot2::map_data(map = "state")
for the U.S. states and merge it with ggplot2::map_data(map = "world")
for the other countries. But I am obviously open to other solutions.