View source: R/geo_utilities.R
geo_neighbors | R Documentation |
Get neighbors of a given contry
geo_neighbors(src, countries, var = "sovereignt", crs = 4326, crop = FALSE)
src |
Source spatial data frame |
countries |
countries of interest |
var |
Variable name |
crs |
Coordinates reference system, default is WGS84 (EPGS:4326) |
crop |
Crop sfc to focus countries extent? |
simple feature class
## Not run:
library(gisr)
cntry <- "Zambia"
shp_ne <- get_necountries()
# Country + neighbors boundaries
cntries <- geo_neighbors(src = shp_ne, countries = cntry)
# Country + neighbors boundaries: crop to country extent
cntries <- geo_neighbors(src = shp_ne, countries = cntry, crop = TRUE)
cntries %>% gview()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.