# NOT RUN {
# Use of regex
regex1 <- esp_get_rivers(name = "Tajo|Segura")
unique(regex1$rotulo)
regex2 <- esp_get_rivers(name = "Tajo$| Segura")
unique(regex2$rotulo)
# See the diference
# Rivers in Spain
shapeEsp <- esp_get_country(moveCAN = FALSE)
MainRivers <-
esp_get_rivers(name = "Tajo$|Ebro$|Ebre$|Duero|Guadiana$|Guadalquivir")
sf::st_bbox(MainRivers)
library(ggplot2)
ggplot(shapeEsp) +
geom_sf() +
geom_sf(data = MainRivers, color = "skyblue", lwd = 2) +
coord_sf(
xlim = c(-7.5, 1),
ylim = c(36.8, 43)
) +
theme_void()
# Wetlands in South-West Andalucia
and <- esp_get_prov(c("Huelva", "Sevilla", "Cadiz"))
Wetlands <- esp_get_rivers(spatialtype = "area")
ggplot(and) +
geom_sf() +
geom_sf(
data = Wetlands, fill = "skyblue",
color = "skyblue", alpha = 0.5
) +
coord_sf(
xlim = c(-7.5, -4.5),
ylim = c(36, 38.5)
) +
theme_void()
# }
Run the code above in your browser using DataLab