First, let’s load the r package leaflet.
library(leaflet)
## Warning: package 'leaflet' was built under R version 3.5.3
Then we load the needed information to put in the map. Namely, the latitude and longitude of the restaurants and the price information.
lat <- c(14.194997,
14.193648,
14.203241,
14.197178,
14.196773,
14.195238,
14.193546,
14.193168,
14.191829,
14.202985,
14.203853,
14.203544,
14.193936)
long <- c(121.163734,
121.165697,
121.155047,
121.162149,
121.162539,
121.163718,
121.165273,
121.165574,
121.166768,
121.155261,
121.154983,
121.154923,
121.164903)
pop <- c("Wing Bites <br> Price: ???????????????",
"Mcdonald's <br> Price: ???????????????",
"KFC<br> Price: ???????????????",
"Happy Tummy Halang <br> Price: ???????????????",
"Yellow Cab Pizza <br> Price: ???????????????",
"Shakey's <br> Price: ???????????????",
"Kenny Rogers <br> Price: ???????????????",
"Army Navy <br> Price: ???????????????",
"Domino's Pizza <br> Price: ???????????????",
"Pancake House<br> Price: ???????????????",
"Greenwich <br> Price: ???????????????",
"Kenny Rogers <br> Price: ???????????????",
"Burger King <br> Price: ???????????????"
)
Now, we create our map.
restaurant_map <- leaflet() %>%
addTiles() %>%
addMarkers(lng=long, lat=lat, popup=pop)
restaurant_map