Problem 17-1

Author

Nikhil Tarigonda

Published

December 1, 2022

Required packages,

library(leaflet)
library(ggspatial)
library(tidyverse)

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