## Assuming 'lng' and 'lat' are longitude and latitude, respectively
## Assuming 'lng' and 'lat' are longitude and latitude, respectively
R Code for the above created interactive map (using leaflet) is as below:
library(leaflet)
hyd_icon <- makeIcon(
iconUrl = "https://d30y9cdsu7xlg0.cloudfront.net/png/117601-200.png",
iconWidth = 31*512/512, iconHeight = 31,
iconAnchorX = 31*512/512/2, iconAnchorY = 16
)
hyd_places <- data.frame(name = c("Charminar", "Golconda", "Hussain Sagar", "Salar Jung
Museum", "Ramoji Film City", "Chowmahalla palace",
"Purani Haveli", "Shilparamam", "Nehru Zoo Park"),
year = c(1591, 1518, 1563, 1951, 1996, 1880, 1880, 1998,
1963),
lat = c(17.3616, 17.3833, 17.4239, 17.3715, 17.2543, 17.3578,
17.3651, 17.4510, 17.3511),
lng = c(78.4747, 78.4011, 78.4738, 78.4803, 78.6808, 78.4717,
78.4821, 78.3770, 78.4489)
)
hyd_places_sites <- c(
"<a href='https://en.wikipedia.org/wiki/Charminar'>About Charminar</a>",
"<a href='https://en.wikipedia.org/wiki/Golkonda'>About Golkonda</a>",
"<a href='https://en.wikipedia.org/wiki/Hussain_Sagar'>About Hussain Sagar</a>",
"<a href='https://en.wikipedia.org/wiki/Salar_Jung_Museum'>About Salar Jung
Museum</a>",
"<a href='https://en.wikipedia.org/wiki/Ramoji_Film_City'>About Ramoji Film City</a>",
"<a href='https://en.wikipedia.org/wiki/Chowmahalla_Palace'>About Chowmahalla Palace</a>",
"<a href='https://en.wikipedia.org/wiki/Purani_Haveli'>About Purani Haveli</a>",
"<a href='https://en.wikipedia.org/wiki/Shilparamam'>About Shilparamam</a>" ,
"<a href='https://en.wikipedia.org/wiki/Nehru_Zoological_Park'>About Nehru Zoo Park</a>"
)
hyd_places %>%
leaflet() %>%
addTiles() %>%
addMarkers(icon = hyd_icon, popup = hyd_places_sites, clusterOptions =
markerClusterOptions()) %>%
addCircles(weight = 1, radius = (2017-hyd_places$year)*2)