Summary

In this project, our goal is to Create a web page using R Markdown that features a map created with Leaflet. The map has to have a date printed as well. To be creative we have used University of British Columbia (UBC) logo and put it in the proper buildings. Logo shows up and the name of the university is also poped up. I chose to keep echo TRUE to show to source code.

Source code for loading the required package and map creation

format(Sys.time(), "%a %b %d %X %Y")
FALSE [1] "Tue May 16 4:33:20 PM 2017"
require(magrittr)
require(leaflet)
ubcIcon <- makeIcon(
  iconUrl = "https://womenshealthresearchinstitute.files.wordpress.com/2014/01/colour-ubc-graphic-with-tag.png",
  iconWidth = 31*200/230, iconHeight = 31,
  iconAnchorX = 31*200/230/2, iconAnchorY = 16
)

ubclatlng <- data.frame(
  lat = c(49.2765, 49.264412, 49.260607),
  lng = c(-123.2177, -123.254972, -123.246002)
)
  
ubclatlng %>% leaflet() %>% addTiles() %>% addMarkers(icon = ubcIcon, popup = "University of British Columbia")