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

In this project, we would love to demonstrate several landmarks in New York City, including Statue of Liberty, Times Square, Central Park, Empire State Building and World Trade Center.

Create a map

leaflet() %>%
  addTiles() %>%
  addMarkers(lat = 40.6892, lng = -74.0445, popup = "Statue of Liberty") %>%
  addMarkers(lat = 40.7589, lng = -73.9851, popup = "Times Square") %>%
  addMarkers(lat = 40.7829, lng = -73.9654, popup = "Central Park") %>%
  addMarkers(lat = 40.7484, lng = -73.9857, popup = "Empire State Building") %>%
  addMarkers(lat = 40.7127, lng = -74.0134, popup = "World Trade Center") %>%
  setView(lat = 40.7589, lng = -73.9851, zoom = 11)