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 INEI Spatial Data Portal.
Arguments
- dsn
Character. Path to the output
.gpkg
file or a directory where the file will be saved. If a directory is provided, the file will be saved asPROVINCIA.gpkg
inside it. IfNULL
, a temporary file will be created. If the path contains multiple subdirectories, they will be created automatically if they do not exist.- show_progress
Logical. Suppress bar progress.
- quiet
Logical. Suppress info message.
- timeout
Seconds. Number of seconds to wait for a response until giving up. Cannot be less than 1 ms. Default is 60.
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 -...
# }