please make a map of your home state / neighborhood or region.
library(leaflet)
library(maptools)
## Loading required package: sp
## Checking rgeos availability: TRUE
leaflet() %>% addTiles()
leaflet() %>%
addTiles() %>%
addCircleMarkers(lng = -73.984016, lat = 40.754932, color = 'red')
m = leaflet() %>% addTiles() %>%
addCircleMarkers(lng = -73.984016, lat = 40.754932, color = 'red')
countylines <- readShapeSpatial("~/Desktop/NYCountyShp/cty036.shp")
## Warning: use rgdal::readOGR or sf::st_read
## Warning: use rgdal::readOGR or sf::st_read
countylines <- readShapeSpatial("~/Desktop/NYCountyShp/cty036.shp")
## Warning: use rgdal::readOGR or sf::st_read
## Warning: use rgdal::readOGR or sf::st_read
countylines$proj4string <- "+proj=longlat +ellps=clrk66"
m %>% addPolygons(data=countylines, fill = TRUE, color = "blue")
m %>% addPolygons(data=countylines,
fill = TRUE,
color = "yellow",
fillOpacity= 0.4,
stroke = FALSE)
m %>% addPopups(-73.984016,40.754932, "My NYC Apartment!")
m %>% addLegend(pal = pal, values = ~estimate, position=“bottomleft”, title = “NY County & NYC”)