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.
Submission Here is an interactive map of historical locations of my hometown Kolkata(Calcutta). the following locations are included- 1. Victoria Memorial 2. Fort William 3. Howrah Bridge 4. Writer’s Building 5. Jorasankho Thakurbari Rabindranath Tagore’s House 6. Eden Gardens Stadium
m <- leaflet() %>%
addTiles() %>% # Add default OpenStreetMap map tiles
addMarkers(lat=22.5448, lng=88.3426, popup="Victoria Memorial") %>%
addMarkers(lat=22.5542,lng=88.3359, popup="Fort William") %>%
addMarkers(lat=22.5851,lng=88.3468, popup="Howrah Bridge") %>%
addMarkers(lat=22.5738,lng=88.3487, popup="Writer's Building") %>%
addMarkers(lat=22.5855,lng=88.3568, popup="Jorasankho Thakurbari") %>%
addMarkers(lat=22.5646,lng=88.3433, popup="Eden Gardens Stadium") #%>%
#setView (lat=22.5726, lng=88.3639, zoom=16)
m # Print the map
Mapping Clusters When you zoom in to each cluster, the cluster will seperate until you see the individual Markers!!
df <- data.frame(lat=runif(500, min=22.47, max = 22.57 ),
lng=runif(500, min=88.36, max = 88.46))
df %>%
leaflet() %>%
addTiles() %>%
addMarkers(clusterOptions = markerClusterOptions())