My First Map

Let’s create a map that shows the Tour Eiffel in Paris. To do that, let’s first load the library Leaflet.

library(leaflet)
## Warning: package 'leaflet' was built under R version 3.4.3

Create the map of Paris

my_map <- leaflet() %>%
addTiles()
my_map

Create a link to the office site of Eiffel Tour, which we could get relevant information.

EiffelTour <- c("<a href= 'http://www.toureiffel.paris' >Eiffel Tour</a>")
leaflet() %>%
addTiles() %>%
addMarkers(lat=48.858053, lng=2.294289, popup = EiffelTour) 

Now if we click the blue icon on the map, it will display Eiffel Tour and the link.