-> 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!
Review criteria
The rubric contains the following two questions:
- Does the web page feature a date and is this date less than two months before the date that you’re grading this assignment?
- Does the web page feature an interactive map that appears to have been created with Leaflet?
visits_df <- data.frame(lat = c(3.1577636,
1.323896,
6.35,
0.7943804858897054,
1.199004),
lng = c(101.71186,
103.80161399999997,
99.80,
103.77874374389648,
104.40660000000003))
popup = c("Kuala Lumpur<br><img src='http://www.manversusworld.com/wp-content/uploads/2012/06/IMG_3241-e1426112356132.jpg' height='200' width='200'></img>",
"Singapore<br><img src='https://s-ec.bstatic.com/images/hotel/max1024x768/151/15197599.jpg', height='200', width='200'></img>",
"Langkawi<br><img src='https://traveldigg.com/wp-content/uploads/2016/08/Langkawi-Sky-Bridge-Malaysia.jpg', height='200', width='200'></img>",
"Telunas<br><img src='https://media-cdn.tripadvisor.com/media/photo-s/02/b5/99/a1/telunas-beach-resort.jpg', height='200', width='200'></img>",
"Bintan<br><img src='http://www.traveltodaylah.com.my/upload/package/package_1818_CLUBMED-BINTANISLANDINDON7-ASIABOOKIN%20.jpg', height='200', width='200'></img>")
visits_icon <- makeIcon(
iconUrl = "https://lh3.googleusercontent.com/9qepNCtoO6zGcLBt0-aqLWLCQT-chadN4iIXlmkQRPp54mrGv3r5_dVR6UwU6lNcPEPB1FWspP4qF1gShWIODWWTiG0t2XUQa-zbjJDzieVPMAaq2AEsRwm91zM0vLiVA_JvakbN1HA78javphDjafimj8lVyEdyH8yuz_5-HcmZeE62iQga5hYWgNVQRF-DM-1bha9otCL8yzzg_9Bc44ba0PYqWhH832GD-JixoMTwP54Gd8972KvAPcwaeELvhJPt4xNt4HmkTBxBqRS8eUM55SkrAI4cVxdpIJ8ff4BcwXXi3E9BYSMwRVAP2ymzTKCFVyUS0efi8pL76wegkhIM74UXqg6QNtLdtJOJvQzut7v4YxhdCFIYDCkYLDoD4Hh84TwJ1c-Xj9OOBd71wbw5oAoTwn1eClm5V6Vj4SE5hE3qhgOqoaDNgJJmHU22gsUY047IdM2HMGUohZ-kM_Yzo2ZbqhkaPy4Pdz-dP3qKRD10kIdRi-PL7pftjnHIosdiQPMGnUXNugWWB-ChgGMhntnq5cZGk2RSQ-4N6B_L8lPjSVrTKDAYD0sVU7Irfm4vTzReY7R_SN_OuGKCsOcUGH5h9fAS051n3ZivIQ=s811-no",
iconWidth = 40,
iconHeight = 40,
iconAnchorX = 40/2,
iconAnchorY = 20
)
my_map <- visits_df %>%
leaflet() %>%
addMarkers(popup = popup, icon = visits_icon) %>%
addTiles()
my_map