Skip to contents

This function allows you to download the latest version of the geometry and ubigeos corresponding to the official political division of the province boundaries of Peru. For more information, you can visit the following page https://ide.inei.gob.pe/

Usage

get_provinces(dsn = NULL, show_progress = TRUE, quiet = TRUE)

Arguments

dsn

Character. Output filename. If missing, a temporary file is created.

show_progress

Logical. Suppress bar progress.

quiet

Logical. Suppress info message.

Value

An sf or tibble object.

Examples

# \donttest{
library(geoidep)
prov <- get_provinces(show_progress = FALSE)
head(prov)
#> Simple feature collection with 6 features and 8 fields
#> Geometry type: MULTIPOLYGON
#> Dimension:     XY
#> Bounding box:  xmin: -78.71089 ymin: -6.986759 xmax: -77.1323 ymax: -2.986125
#> Geodetic CRS:  WGS 84
#>   id OBJECTID CCDD CCPP  NOMBDEP             NOMBPROV SHAPE_Length SHAPE_Area
#> 1  1        1   01   02 AMAZONAS                BAGUA     4.441617  0.4685108
#> 2  2        2   01   03 AMAZONAS              BONGARA     3.038661  0.2313185
#> 3  3        3   01   01 AMAZONAS          CHACHAPOYAS     3.872238  0.2376054
#> 4  4        4   01   04 AMAZONAS         CONDORCANQUI     7.617350  1.4552407
#> 5  5        5   01   05 AMAZONAS                 LUYA     2.868283  0.2701449
#> 6  6        6   01   06 AMAZONAS RODRIGUEZ DE MENDOZA     2.748516  0.2110614
#>                             geom
#> 1 MULTIPOLYGON (((-78.61909 -...
#> 2 MULTIPOLYGON (((-77.72759 -...
#> 3 MULTIPOLYGON (((-77.72614 -...
#> 4 MULTIPOLYGON (((-77.81399 -...
#> 5 MULTIPOLYGON (((-78.13023 -...
#> 6 MULTIPOLYGON (((-77.44452 -...
# }