Create a web page using R Markdown that features a map created with Leaflet.
Host your webpage on either GitHub Pages, RPubs, or NeoCities.
Your webpage must contain the date that you created the document, and it must contain a map created with Leaflet. We would love to see you show off your creativity!
The rubric contains the following two questions:
This page was built in RStudio using R Markdown and the Leaflet package to build an interactive map of the locations of Frankie’s New York Buffalo Wings.I love their Honey Mustard wings!
A. Free Up Memory
rm(list=ls())
B. Setwd
setwd("~/Documents/Files/Zetch/Online Courses/Data Science Specialization Feb18/R/Developing Data Products")
C. Load Library
library(leaflet)
D. Create Map
fnyIcon <- makeIcon(
iconUrl = "~/Documents/Files/Zetch/Online Courses/Data Science Specialization Feb18/R/Developing Data Products/Frankies.png",
iconWidth = 30, iconHeight = 30,
)
fnyLoc <- data.frame(name = c("Frankie's SM Megamall",
"Frankie's City Golf",
"Frankie's Kapitolyo",
"Frankie's Crossroads BGC"),
lat = c(14.583390, 14.588234, 14.574194, 14.553551),
lng = c(121.056787, 121.067098, 121.060768, 121.051349))
fnySites <- c(
"<a href='http://frankiesnywings.com/branches/sm-megamall/'>Frankie's New York Buffalo Wings SM Megamall</a>",
"<a href='http://frankiesnywings.com/branches/city-golf/'>Frankie's New York Buffalo Wings City Golf Plaza</a>",
"<a href='http://frankiesnywings.com/branches/kapitolyo/'>Frankie's New York Buffalo Wings Kapitolyo</a>",
"<a href='http://frankiesnywings.com/branches/crossroad-bgc/'>Frankie's New York Buffalo Wings CrossRoads BGC</a>"
)
fnyLoc %>%
leaflet() %>%
addTiles() %>%
addMarkers(icon = fnyIcon, popup = fnySites)
## Assuming "lng" and "lat" are longitude and latitude, respectively