This project is to create interactive map about Canandian cities and parks using leaflet package with R markdown. For each circled color provide the cities and parks according to the locations and can be checked the names by clicking the icons.
library(leaflet)
df <- read.csv("./Data/cities.csv")
mylatlng <- data.frame( lat = df$Latitude,
lng = df$Longitude,
popup = df$Place.Name,
color = df$Col)
label <- c("Cities", "Parks", "National Parks")
mylatlng %>%
leaflet() %>%
addTiles() %>%
addMarkers(popup = ~popup, clusterOptions = markerClusterOptions()) %>%
#addCircleMarkers(color = df$Col) %>%
addCircleMarkers(color = ~color) %>%
addLegend(labels = label,colors = c("red", "blue", "green"))
Appendix
Reference : Latitiude and Longitude information on this projet :
LatLong.net : https://www.latlong.net/