The objective of this assignment is to create a web page using R Markdown that features a map created with Leaflet.
The webpage needs to be hosted on either GitHub Pages, RPubs, or NeoCities.
The webpage must contain the date that it is created the document, and it must contain a map created with Leaflet.
This map shows five local pet clinics near me. The one on top right corner is highly recommanded with five stars, but too far. The closest one is not too good. Hard to choose. I wish Charlie could.
library(leaflet)
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
lat <- c(43.846563, 43.859345, 43.862972, 43.877723, 43.900939)
lng <- c(-79.357595, -79.358269, -79.307160, -79.309750, -79.264510)
df <- data.frame(lat, lng)
puppyIcon <- makeIcon(
iconUrl = "C:/Users/JJQ/Pictures/fidodoggie.png",
iconWidth = 31*215/230, iconHeight = 31, iconAnchorX = 31*215/230/2, iconAnchorY = 16)
my_map <- df %>% leaflet() %>%
addTiles() %>%
addMarkers(icon = puppyIcon, popup = c("Kim Pet Hospital","Apple Creek Animal Clinic", "Unionville Animal Hospital", "MajorMac Pet Clinic", "Mount Joy Clinic" ))
my_map