Ir al contenido

Downloads the department or district boundaries published by INEI in its spatial data infrastructure (IDE INEI, layers ig_departamento and ig_distrito) and keeps them in the cache, so the download happens once. The files are large (about 9 MB and 47 MB) and are never part of the package.

Uso

fa_geometry(
  level = c("department", "district"),
  cache = fa_cache(),
  refresh = FALSE
)

Fuente

https://ide.inei.gob.pe/, WFS service at https://geoespacial.inei.gob.pe/geoserver/Interoperabilidad/ows.

Argumentos

level

"department" or "district".

cache

Cache folder; the files go to <cache>/GEO.

refresh

Download again even if the file is cached.

Valor

An sf object with code (two-digit department code or six-digit ubigeo), name and the geometry.

Ejemplos

if (FALSE) { # \dontrun{
dep <- fa_geometry("department")
} # }