Make sure you have them before runing the file.
library(knitr)
library(leaflet)
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
Sys.Date()
## [1] "2020-10-08"
The most important parks of my city, Guayaquil, Ecuador are shown here.
m <- leaflet() %>%
addTiles() %>% # Add default OpenStreetMap map tiles
addMarkers(lat=-2.0798088, lng=-79.9091529, popup="Botanic garden") %>%
addMarkers(lat=-2.1444655, lng=-79.8698102, popup="Historic Park") %>%
addMarkers(lat=-2.190025, lng=-79.8877407, popup="Park Centenario") %>%
addMarkers(lat=-2.1037741, lng=-79.8982213, popup="Park Samanes")
m # Print the map