Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 205343

How can I color in one zipcode in a map, RStudio?

$
0
0

I made a zipcode map of dallas using this shapefile: https://gis.dallascityhall.com/shapefileDownload.aspx (Street Files)

dallas_streets %>% 
  sample_frac(1) %>% 
  group_by(POSTAL_L) %>% 
  summarize(geometry = st_convex_hull(st_union(geometry))) %>% 
  ggplot() + ggtitle("Zip Code Map of Dallas") +
  geom_sf(aes(fill = as.numeric(POSTAL_L))) + 
  geom_sf_text(aes(label = POSTAL_L)) + 
  scale_fill_viridis_c(option = "C") +
  theme_minimal()

This is what I have right now

I want to be able to have the map as greyscale and only one zipcode colored in, please let me know if you can help. Thanks!


Viewing all articles
Browse latest Browse all 205343

Trending Articles