Instructions for project

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?

Project Submission

Here is the Eastern cities in Maryland, the city of Philadelphia and Boston

library(knitr)
library(leaflet)
m <- leaflet() %>%
  addTiles() %>%  
  addMarkers(lat=39.952583, lng=-75.165222, popup="Philadelphia, PA") %>%
  addMarkers(lat=42.392925,lng=-71.037109, popup="Chelsea, MA") %>%
  addMarkers(lat=42.856842,lng=-70.963440, popup="Amesbury, MA") %>%
  addMarkers(lat=38.981544,lng=-77.010674, popup="Takoma Park, MD") %>%
  addMarkers(lat=39.0864372,lng=-77.161263, popup="Rockville, MD") %>%
  addMarkers(lat=39.644207,lng=-77.731430, popup="Hagerstown, MD") %>%
  addMarkers(lat=38.998318,lng=-76.896332, popup="Greenbelt, MD") %>%
  addMarkers(lat=39.649109,lng=-78.769714, popup="Cumberland, MD") #%>%
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=39.05, max = 40.85 ),
                 lng=runif(500, min=75.05, max = 76.15 ))    
df %>%
leaflet() %>%
addTiles() %>%  
addMarkers(clusterOptions = markerClusterOptions())