Instructions

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!

library(leaflet)
## Warning: package 'leaflet' was built under R version 3.3.2
list_cities <-data.frame(name = c("Alcorcon", "Leganes", "Mostoles"),
                         pop = c(170336, 186696, 2057012),
                         lat = c(40.35, 40.32825, 40.333333),
                         lng = c(-3.833333, -3.765403, -3.866667))
veriskIcon <-makeIcon(
    iconUrl = "http://logo.clearbit.com/www.verisk.com",
    iconWidth=20, iconHeight = 20)
list_cities %>%
  leaflet() %>%
  addTiles() %>%
  addMarkers(-3.8477,40.35, icon = veriskIcon, popup = "My Work Place") %>%
  addCircles(weight = 1, radius = sqrt(list_cities$pop) * 1, color = c('red', 'blue', 'green'))
## Assuming 'lng' and 'lat' are longitude and latitude, respectively