Project Overview:

The project is created using the library leaflet which is a javascript library and used for creating interactive maps.

Project Guidelines:

  • 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!

Creating the map:

#Loading the necessary libraries:
library(leaflet)

Creating data frame having 30 random Latitude and Longitude and plotting it on the map using leaflet:

set.seed(12345)
df <- data.frame(lat= runif(30, min = 19.07, max = 28.70), long=runif(30, min = 72.87, max = 77.10))
head(df)
##        lat     long
## 1 26.01230 76.22442
## 2 27.50370 72.89533
## 3 26.39826 73.66402
## 4 27.60338 75.75416
## 5 23.46591 74.43554
## 6 20.67216 74.39968
df %>%
  leaflet( width = 900) %>%
  addTiles() %>%
  addMarkers(clusterOptions = markerClusterOptions(), popup = "Hi")