Here, I am going to use Leaflet to show the location of my college on the Map and some more collage and cafe around it the location with the max weighted circle is my college “click” on the location to see the name. The location is in India.
library(leaflet)
## Warning: package 'leaflet' was built under R version 3.4.4
set.seed(4444)
md_cities <- data.frame(name = c("Manipal Institute of Technology", "Kasturba Hospital", " Manipal School of Communication", "Bharat Cinema",
"De Tee", "Cafe coffe Day"),
pop = c(20, 10, 6, 4, 2,
4),
lat = c(13.352703,13.353893, 13.348645, 13.353055, 13.355113, 13.354638),
lng = c(74.792812, 74.790087, 74.790206,74.790251, 74.797946, 74.792812))
names1<-c("Manipal Institute of Technology", "Kasturba Hospital", " Manipal School of Communication", "Bharat Cinema",
"De Tee", "Cafe coffe Day")
md_cities %>%
leaflet() %>%
addTiles() %>%
addMarkers(popup =names1)%>%
addCircles(weight = 1, radius = sqrt(md_cities$pop) * 30)
## Assuming "lng" and "lat" are longitude and latitude, respectively
## Assuming "lng" and "lat" are longitude and latitude, respectively