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.

Your webpage must contain the date that you created the document, and it must contain a map created with Leaflet. We would love to see you show off your creativity!

Review criteria

The rubric contains the following two questions:

Does the web page feature a date and is this date less than two months before the date that you’re grading this assignment? Does the web page feature an interactive map that appears to have been created with Leaflet? ## Submission Here is the India Gate, Qutb Minar, Red Fort, Humayun’s Tomb, Gurudwara Bangla Sahib, Akshardham some of the Visiting locations in Delhi, Capital of India

My First Leaflet Map

Create a leaflet map object.

m <- leaflet() %>%
  addTiles() %>%  # Add default OpenStreetMap map tiles
  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") #%>%
  #setView (lat=28.6129, lng=77.2295, 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=28.65, max = 28.75 ),
                 lng=runif(500, min=77.05, max = 77.15 ))
df %>%
leaflet() %>%
addTiles() %>%  
addMarkers(clusterOptions = markerClusterOptions())