The following submission is for the second week assignment of developing data products course. The map in the submission highlights points of interest India Gate, Qutb Minar, Red Fort, Humayun’s Tomb, Gurudwara Bangla Sahib, Akshardham in Delhi, capital of India.
library(leaflet)
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library(knitr)
map <- leaflet() %>%
addTiles() %>%
addMarkers(lat=28.6129, lng=77.2295, popup="India Gate, Delhi") %>%
addMarkers(lat=28.5244,lng=77.1855, popup="Qutb Minar, Delhi") %>%
addMarkers(lat=28.6562,lng=77.2410, popup="Red Fort, Delhi") %>%
addMarkers(lat=28.5933,lng=77.2507, popup="Humayun's Tomb, Delhi") %>%
addMarkers(lat=28.6264,lng=77.2089, popup="Gurudwara Bangla Sahib, Delhi") %>%
addMarkers(lat=28.6127,lng=77.2773, popup="Akshardham, Delhi") #%>%
map
As you zoom in to each cluster, the cluster will seperate until you see the individual Markers
a <- data.frame(lat=runif(500, min=28.65, max = 28.75 ),
lng=runif(500, min=77.05, max = 77.15 ))
a %>%
leaflet() %>%
addTiles() %>%
addMarkers(clusterOptions = markerClusterOptions())