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! Here’s an extremely minimal passing example, but we hope your submission is much cooler!
The data for this map is taken from Zomato’s API, and restaurants were scraped originally containing more than 1000. For this excercise, randomly selected 300 restaurants were selected to be mapped, with each one containing an address, as well as some information about number of ratings and average rating of the restaurant, at the snapshot of when this data was collected.
The restaurants are initially clustered, and once the user zooms in or clicks on any grouping/cluster, they will see the information about each unique restaurant
library(leaflet)
## Warning: package 'leaflet' was built under R version 3.6.1
library(htmltools)
# Download and unzip the data
fileurl = 'https://srv-file16.gofile.io/download/gU4Fb6/Leaflet.csv'
if (!file.exists('./Restaurant.csv')){
download.file(fileurl,'./Restaurant.csv')
dateDownloaded <- date()
}
Zomato_Rest <- read.csv('./Restaurant.csv', stringsAsFactors = FALSE)
## Assuming "Longitude" and "Latitude" are longitude and latitude, respectively