This package is under heavy development; do not use!
An experimental package to plot OpenStreetMap tiles with geom_sf()
.
devtools::install_github("yutannihilation/ggopenstreetmap")
library(ggplot2)
library(ggopenstreetmap)
nc <- sf::st_read(system.file("shape/nc.shp", package = "sf"), quiet = TRUE)
ggplot(nc) +
annotation_osm(nc) +
geom_sf(aes(fill = AREA), alpha = 0.5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.