library (xplorerr)
source ("https://raw.githubusercontent.com/coreysparks/Rcode/master/mutate_map_funs.R" )
ppov_map<- sa_acs2 %>%
mutate_map_brks (ppov, n= 6 , style= "quantile" )%>%
mutate_map_brks (ppov, n= 6 , style= "jenks" )
medhousin_map<- sa_acs2 %>%
mutate_map_brks (medianhousein, n= 6 , style= "quantile" )%>%
mutate_map_brks (medianhousein, n= 6 , style= "jenks" )
p1<- ggplot (ppov_map, aes (fill = ppov_qbrks)) +
geom_sf (color= "Grey50" ) +
ggtitle ("Proportion in poverty" ,
subtitle = "Bexar County Texas, 2019 - Quantile Breaks" )+
scale_fill_brewer (palette = "Reds" ) +
scale_color_brewer (palette = "Reds" )+
theme (axis.text.x = element_blank (),
axis.text.y = element_blank ())+
north (ppov_map)+
scalebar (ppov_map, location= "bottomleft" ,
dist= 5 , transform = T,
dist_unit = "km" ,
model= "WGS84" ,
st.size = 2 )
p2<- ggplot (medhousin_map, aes (fill = medianhousein_qbrks)) +
geom_sf (color= "Grey50" ) +
ggtitle ("Median Household income in Bexar County" ,
subtitle = "Bexar County Texas, 2019 - Quantile Breaks" )+
scale_fill_brewer (palette = "Reds" ) +
scale_color_brewer (palette = "Reds" )+
theme (axis.text.x = element_blank (),
axis.text.y = element_blank ())+
north (medhousin_map)+
scalebar (medhousin_map, location= "bottomleft" ,
dist= 5 , transform = T,
dist_unit = "km" ,
model= "WGS84" ,
st.size = 2 )