library(ggplot2)
nc <- sf::st_read(system.file("shape/nc.shp", package = "sf"), quiet = TRUE)
ggplot(nc[1:2,]) +
geom_sf(aes(fill = AREA)) +
geom_sf_label(aes(label = NAME),
nudge_x = c(-0.2, 0.2),
nudge_y = c(-0.2, 0.2))
#> Warning in st_point_on_surface.sfc(sf::st_zm(x)): st_point_on_surface may
#> not give correct results for longitude/latitude data
Created on 2019-02-11 by the reprex package (v0.2.1)