I'd like to make a map where the states are colored according to one criteria, and crosshatched (or somehow otherwise differentiated) according to a different criteria. So far what I have is
library(ggmap)
library(mapdata)
library(ggplot2)
library(dplyr)
region<-c("california","nevada","oregon","washington")
var1<-c(0,1,0,1)
var2<-c(3,4,4,3)
my_data<-data.frame(region, var1, var2)
all_states_map <- map_data("state")
Total <- inner_join(all_states_map,my_data, by = "region")
Total$var1<-as.factor(Total$var1)
my_map <- ggplot() + geom_polygon(data=Total, aes(x=long, y=lat, group = Total$group, fill=Total$var1),colour="white",
show.legend=TRUE) + scale_fill_manual(values=c("blue","gray"))
So now my states are color coded based on whether var1 is 0 or 1. Is there a way to overlay something on top of that to crosshatch states where var2 is 3, and leave alone the states where var2 is 4?