Introduction

In this assignment, we create a webpage using R Markdown that shows a map by the Leaflet package.

The webpage is hosted in RPubs and contains the date and the city of Toronto map with markers for the CN tower and the University of Toronto.

# install.packages("leaflet")
library(leaflet)
## Warning: package 'leaflet' was built under R version 3.6.2
# Provide the link for the University of Toronto and the CN Tower
        CN <- "<a href='https://en.wikipedia.org/wiki/CN_Tower'>CN Tower</a>"
        UofT <- "<a href='https://www.utoronto.ca/'>University of Toronto</a>"

# set up map
        my_map <- leaflet() %>% 
                  addTiles() %>%  
# define the markers
        addMarkers(lat=43.642488, lng=-79.387002, popup= CN) %>%
        addMarkers(lat=43.662305, lng=-79.395675, popup= UofT)
# show the map
        my_map