-
Notifications
You must be signed in to change notification settings - Fork 1
DataVizR
https://aibolem.github.io/DataVizR/mapping.html



https://gis.stackexchange.com/questions/29067/openstreetmap-neighborhood-boundaries
대한민국
https://global.mapit.mysociety.org/areas/O06.html

https://www.mysociety.org/advice-and-support/
공주시 ID 1194334 Type: OSM Administrative Boundary Level 6 (O06) Exists in generations: 9–10 Country: 대한민국, Global Get this data as JSON
How to add labels on top of polygons in leaflet

https://stackoverflow.com/questions/48147282/how-to-add-labels-on-top-of-polygons-in-leaflet
`library(raster) library(rgeos) library(leaflet)
UK <- getData("GADM", country = "GB", level = 2)
centers <- data.frame(gCentroid(UK, byid = TRUE)) centers$region <- row.names(UK)
set.seed(111) mydf <- data.frame(place = unique(UK$NAME_2), value = sample.int(n = 1000, size = n_distinct(UK$NAME_2), replace = TRUE))
mypal <- colorQuantile(palette = "RdYlBu", domain = mydf$value, n = 5, reverse = TRUE)
leaflet() %>%
addProviderTiles("OpenStreetMap.Mapnik") %>%
setView(lat = 55, lng = -3, zoom = 6) %>%
addPolygons(data = UK,
stroke = FALSE, smoothFactor = 0.2, fillOpacity = 0.3,
fillColor = ~mypal(mydf$value),
popup = paste("Region: ", UK$NAME_2, "
",
"Value: ", mydf$value, "
")) %>%
addLabelOnlyMarkers(data = centers,
lng = ~x, lat = ~y, label = ~region,
labelOptions = labelOptions(noHide = TRUE, direction = 'top', textOnly = TRUE)) %>%
addLegend(position = "bottomright", pal = mypal, values = mydf$value,
title = "UK value",
opacity = 0.3)`
C World Map