I've been working with plotting covid-19 on a US county map, and thanks to help on this forum have gotten a product I'm pretty happy with. However, I'd like to make a change to the way the legends are produced and am unsure how to. There are several dataframes that go into the below snippet
p <- counties_cov %>%
ggplot() +
geom_sf(mapping = aes(fill = cases), color = NA) +
geom_sf(data = states_sf, fill = NA, color = "black", size = 0.25) +
coord_sf(datum = NA) +
scale_fill_gradient(name = "Cases", trans = "log", low='green', high='red',
na.value = "white",
breaks=c(1, max(counties_cov$cases))) +
geom_point(data=myBizLocations, aes(x=longitude.1, y=latitude.1,size=personnel), color = "hotpink") +
theme_bw() +
theme(legend.position="bottom",
panel.border = element_blank(),
axis.title.x=element_blank(),
axis.title.y=element_blank())
For yesterday's data this produces
What I'd like to do is simply modify the legend text from the current "personnel" which is just the name of the data column used to size the geom_points. I'm unsure of how to do that without impacting the "cases" scale...
Ideally I'd like to go one step further and leave the cases scale on the bottom but put the personnel scale on the right...that's secondary though.