# NOT RUN {
# Madrid, Spain
library(ggplot2)
bbox <- c(
  -3.888954, 40.311977,
  -3.517916, 40.643729
)
# Restaurants and pubs
rest_pub <- geo_amenity_sf(bbox,
  c("restaurant", "pub"),
  limit = 50
)
ggplot(rest_pub) +
  geom_sf()
# Hospital as polygon
hosp <- geo_amenity_sf(bbox,
  "hospital",
  points_only = FALSE
)
ggplot(hosp) +
  geom_sf()
# }
Run the code above in your browser using DataLab