R Markdown and Leaflet Assignment in Developing Data Products Course

In this assignment, we will create a web page using R Markdown that features a map created with Leaflet.

library(leaflet)
library(shiny)
library(miniUI)
library(googleVis)
## 
## Welcome to googleVis version 0.7.1
## 
## Please read Google's Terms of Use
## before you start using the package:
## https://developers.google.com/terms/
## 
## Note, the plot method of googleVis will by default use
## the standard browser to display its output.
## 
## See the googleVis package vignettes for more details,
## or visit https://mages.github.io/googleVis/.
## 
## To suppress this message use:
## suppressPackageStartupMessages(library(googleVis))
library(plotly)
## Loading required package: ggplot2
## 
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
## 
##     last_plot
## The following object is masked from 'package:stats':
## 
##     filter
## The following object is masked from 'package:graphics':
## 
##     layout
library(manipulate)
content <- paste(sep = "<br/>",
                 "<b><a href='https://www.machupicchu.gob.pe/?lang=en'>Machu Picchu</a></b>",
                 "Historical place in Peru",
                 "One of the most beautiful places on earth",
                 "June 6th,2023"
)

my_map <- leaflet() %>%
        addTiles()
my_map <- my_map %>% 
        addMarkers(my_map, lat = -13.163068, lng = -72.545128, popup = "Machu Picchu") %>%
        addMarkers(my_map, lat = -12.0240527, lng = -77.11203599999999, popup = "Jorge Chávez International Airport") %>%
        addMarkers(my_map, lat = -12.046374, lng = -77.042793, popup = "Lima, Capital of Peru") 

my_map <- my_map %>%
        addPopups(-72.545128, -13.163068, content, options = popupOptions(closeButton = FALSE)
        )
my_map