leaflet
## Coordinate Reference System:
## User input: NAD27
## wkt:
## GEOGCRS["NAD27",
## DATUM["North American Datum 1927",
## ELLIPSOID["Clarke 1866",6378206.4,294.978698213898,
## LENGTHUNIT["metre",1]]],
## PRIMEM["Greenwich",0,
## ANGLEUNIT["degree",0.0174532925199433]],
## CS[ellipsoidal,2],
## AXIS["latitude",north,
## ORDER[1],
## ANGLEUNIT["degree",0.0174532925199433]],
## AXIS["longitude",east,
## ORDER[2],
## ANGLEUNIT["degree",0.0174532925199433]],
## ID["EPSG",4267]]
pal <- colorNumeric("YlOrRd", domain = map$SID74)
leaflet::leaflet(map) %>%
addTiles() %>%
addPolygons(
color = "white", fillColor = ~ pal(SID74),
fillOpacity = 1
) %>%
addLegend(pal = pal, values = ~SID74, opacity = 1)
## Warning: sf layer has inconsistent datum (+proj=longlat +datum=NAD27 +no_defs).
## Need '+proj=longlat +datum=WGS84'
mapview
mapview::mapview(map, zcol = "SID74")
pal <- colorRampPalette(RColorBrewer::brewer.pal(9, "YlOrRd"))
mapview::mapview(map,
zcol = "SID74",
map.types = "CartoDB.DarkMatter",
col.regions = pal
)
m74 <- mapview(map, zcol = "SID74")
m79 <- mapview(map, zcol = "SID79")
m <- leafsync::sync(m74, m79) #(not from mapview)
m