| Title: | Download Spatial Datasets of Peru |
| Version: | 0.0.1 |
| Description: | Provides access to official spatial datasets of Peru as 'sf' objects in 'R'. Includes administrative boundaries from the National Institute of Statistics and Informatics (INEI) https://ide.inei.gob.pe/ and protected natural areas from the National Service of Natural Areas Protected by the State (SERNANP) https://www.gob.pe/institucion/sernanp/pages/21261-acceder-a-informacion-espacial-de-las-area-naturales-protegidas-visor-de-informacion-geografica. Harmonizes attributes, coordinate reference systems, and topology to support consistent spatial analysis and visualization. |
| License: | MIT + file LICENSE |
| Suggests: | testthat (≥ 3.0.0) |
| Config/testthat/edition: | 3 |
| Encoding: | UTF-8 |
| RoxygenNote: | 8.0.0 |
| BugReports: | https://github.com/PaulESantos/geoperu/issues |
| Depends: | R (≥ 3.6.0) |
| LazyDataCompression: | xz |
| LazyData: | true |
| URL: | https://github.com/PaulESantos/geoperu, https://paulesantos.github.io/geoperu/ |
| Imports: | httr, sf |
| NeedsCompilation: | no |
| Packaged: | 2026-07-05 03:09:03 UTC; PC |
| Author: | Paul E. Santos Andrade
|
| Maintainer: | Paul E. Santos Andrade <paulefrens@gmail.com> |
| Repository: | CRAN |
| Date/Publication: | 2026-07-05 05:40:02 UTC |
Download Spatial Data of Protected Natural Areas (ANP) in Peru
Description
Downloads spatial data of protected natural areas in Peru declared by SERNANP (National Service of Natural Areas Protected by the State). Data were obtained from the SERNANP Geographic Information Viewer as the official source. The data use WGS 84 (EPSG:4326).
Usage
get_anp_peru(anp = NULL, showProgress = TRUE)
Arguments
anp |
A character or a vector with the name(s) of the protected natural areas in Peru. |
showProgress |
Logical TRUE or FALSE to display a progress bar during download. |
Value
An "sf" "data.frame" object containing the spatial data of Peru's protected natural areas.
Examples
if (interactive()) {
# Read specific ANP
manu <- get_anp_peru(anp = "Manu")
}
Download spatial data of Peru
Description
Downloads spatial data of Peru using the WGS 84 geodetic reference system (EPSG:4326).
Usage
get_geo_peru(
geography = "all",
level = "all",
simplified = TRUE,
showProgress = TRUE
)
Arguments
geography |
A character or a vector with the name of geographical region. An exception is "all" to request all Peru data. |
level |
A character: "all" for national level data, "dep" for department level data, and "prov" for provincial level data. |
simplified |
A logical TRUE or FALSE, to select data with all districts or a polygon simplified to a higher level. |
showProgress |
Logical TRUE or FALSE to display a progress bar during download. |
Value
An "sf" "data.frame" object containing the spatial data of Peru.
Examples
if (interactive()) {
# Read specific province
anta <- get_geo_peru(geography = "ANTA",
level = "prov",
simplified = TRUE)
}
Districts of Peru
Description
An sf object containing district-level administrative boundaries of Peru
in the WGS 84 coordinate reference system (EPSG:4326).
Usage
peru
Format
An sf object with 1,874 rows and four variables:
- departamento
Department name.
- provincia
Province name.
- distrito
District name.
- geometry
Polygon geometry.