# NOT RUN {
library(sf)
Provs <- esp_get_prov()
Box <- esp_get_can_box()
Line <- esp_get_can_provinces()
plot(st_geometry(Provs), col = hcl.colors(4, palette = "Grays"))
plot(Box, add = TRUE)
plot(Line, add = TRUE)
# Displacing Canary
Provs_D <- esp_get_prov(moveCAN = c(15, 0))
Box_D <- esp_get_can_box(style = "left", moveCAN = c(15, 0))
Line_D <- esp_get_can_provinces(moveCAN = c(15, 0))
plot(st_geometry(Provs_D), col = hcl.colors(4, palette = "Grays"))
plot(Box_D, add = TRUE)
plot(Line_D, add = TRUE)
# Example with poly option
library(giscoR)
Countries <-
gisco_get_countries(res = "20",
epsg = "4326",
region = c("Europe", "Africa"))
CANbox <-
esp_get_can_box(style = "poly",
epsg = "4326",
moveCAN = c(12.5, 0))
CCAA <- esp_get_ccaa(res = "20",
epsg = "4326",
moveCAN = c(12.5, 0))
plot_sf(CCAA, axes = TRUE)
plot(st_geometry(Countries), col = "grey80", add = TRUE)
plot(st_geometry(CANbox),
border = "black",
col = "white",
add = TRUE)
plot(st_geometry(CCAA), add = TRUE, col = "beige")
box()
# }
Run the code above in your browser using DataLab