library(leaflet)
library(ggspatial)
library(tidyverse)Problem 17-1
Required packages,
Passing the address,
location <- tibble(
address = "Emily Dickinson Museum in Amherst, Massachusetts"
) %>%
tidygeocoder::geocode(address, method = "osm")Passing 1 address to the Nominatim single address geocoder
Query completed in: 1 seconds
location_map <- leaflet() %>%
addTiles() %>%
addMarkers(data = location,popup="Emily Dickinson Museum")Assuming "long" and "lat" are longitude and latitude, respectively
location_map