library(ggplot2)
nc <- sf::st_read(system.file("shape/nc.shp", package = "sf"), quiet = TRUE)
ggplot(nc) +
geom_sf_inset() +
geom_inset_frame() +
geom_sf_text(
aes(x = after_stat(x_inset), y = after_stat(y_inset), label = NAME),
stat = "sf_coordinates_inset") +
coord_sf_inset(configure_inset(
shape_circle(
centre = sf::st_sfc(sf::st_point(c(-80, 35.5)), crs = 4326),
radius = 50
),
scale = 1.5, translation = c(-50, -140), units = "mi"
))
Run the code above in your browser using DataLab