library(leaflet)
wolvesIcon<-makeIcon(iconUrl = "http://www.futbol24.com/upload/team/Italy/Cosenza-Calcio.png",
iconWidth = 64*215/230, iconHeight = 64,
iconAnchorX = 31*215/230/2, iconAnchorY = 16)
md_cities <- data.frame(name = c("Cosenza","Rende","Castrolibero"),
population = c(67546,35338,9894),
lat = c(39.2974861,39.328507,39.3085111),
lng = c(16.2519203,16.238084,16.2158953))
md_cities %>%
leaflet() %>%
addTiles() %>%
addCircles(weight = 5, radius = md_cities$pop/20) %>% addMarkers(lat=39.3105781,lng=16.2300763,icon=wolvesIcon)
## Assuming 'lng' and 'lat' are longitude and latitude, respectively
md_cities
## name population lat lng
## 1 Cosenza 67546 39.29749 16.25192
## 2 Rende 35338 39.32851 16.23808
## 3 Castrolibero 9894 39.30851 16.21590
I love it.