R Markdown and R Leaflet Assignment Coursera

Objectives of the Work

  • 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?
Sys.time()
## [1] "2022-01-02 10:52:28 GMT"
Sys.Date()
## [1] "2022-01-02"
  • Does the web page feature an interactive map that appears to have been created with Leaflet?

I will show in the map top 5 cities to do vacations in Europe.

library(leaflet)

mp <- leaflet()
mp <- addTiles(mp)
mp <- addMarkers(mp, lng=12.5683, lat=55.6761, popup="Copenhagen, Denmark")
mp <- addMarkers(mp, lng=5.1214, lat=52.0907, popup="Utrecht, The Netherlands")
mp <- addMarkers(mp, lng=11.1525, lat=46.6713, popup="Merano, Italy")
mp <- addMarkers(mp, lng=9.9937, lat=53.5511, popup="Hamburg, Germany")
mp <- addMarkers(mp, lng=7.7521, lat=48.5734, popup="Strasbourg, France")
mp