This document shows an interactive map created with Leaflet, corresponding to the assigment of the week 2, Developing Data Products course from Coursera.
The map shows three places of recent checkins done by me in the city of Mississauga in Canada.
Each place of checkin has a different colored marker and clicking on the market opens up a short description of the place with a web link to the website of that place.
# Week 2 assignment
library(leaflet)
MapleWoods <- c("<a href='http://www.themaplewoods.com'>The Maplewoods</a>")
ValleySenior <- c("<a href='http://schools.peelschools.org/1354/Pages/default.aspx'>Valleys Senior Public School</a>")
IonaPlaza <- c("<a href='https://www.insauga.com/place/metro-iona-plaza'>Metro at Iona</a>")
checkins <- data.frame(
names = c(MapleWoods, ValleySenior, IonaPlaza),
lat = c(43.595010, 43.598351, 43.592065),
lng = c(-79.629415, -79.623815, -79.626422),
address = c("Mississauga L5A3Y4", "Mississauga L5A3R8", "Mississauga L5A3W9")
)
checkins %>% leaflet() %>% addTiles() %>%
addCircleMarkers(~lng, ~lat, popup = paste0("<b>", checkins$names, "<br>", checkins$address), options = popupOptions(closeButton = FALSE), color=c("green","blue","red"))