The requirementes to this assignment:
1. Create a web page using R Markdown that features a map created with Leaflet.
2. Host your webpage on either GitHub Pages, RPubs, or NeoCities.
3. Your webpage must contain the date that you created the document, and it must contain a map created with Leaflet.
In this assignment, we’ll show a map of Toronto, ON Canada with three campus of University of Toronto. When clicking websites links will popup.
library(leaflet)
uoftLatlng <- data.frame(
lat=c(43.6629, 43.7860, 43.5479),
lng=c(-79.3957, -79.1873, -79.6609))
uoftSites <- c(
"<a href='https://www.utoronto.ca/'>University of Toronto</a>",
"<a href='http://utsc.utoronto.ca'>University of Toronto at Scarborough</a>",
"<a href='http://utm.utoronto.ca'>University of Toronto at Mississauga</a>"
)
my_map <- leaflet()
my_map <- addTiles(my_map)
my_map <- addMarkers(my_map, lat=uoftLatlng$lat, lng=uoftLatlng$lng, popup=uoftSites)
my_map