Skip to contents

This function allows you to download the latest version of the harzards data available on the SIGRID geoportal. For more information, you can visit the following web page: SIGRID Geoportal

Usage

get_hazard_data(layer = NULL, dsn = NULL, show_progress = TRUE, quiet = TRUE)

Arguments

layer

Select only one from the list of available layers, for more information please use `get_data_sources(provider = "SIGRID")`. Defaults to NULL.

dsn

Character. Output filename with the spatial format. If missing, a temporary file is created.

show_progress

Logical. Suppress bar progress.

quiet

Logical. Suppress info message.

Value

An sf object.

Examples

# \donttest{
library(geoidep)
library(sf)
#> Linking to GEOS 3.12.1, GDAL 3.8.4, PROJ 9.4.0; sf_use_s2() is TRUE
inundaciones <- get_hazard_data(layer = "inundacion_inventario" , show_progress = FALSE)
head(inundaciones)
#> Simple feature collection with 6 features and 24 fields
#> Geometry type: POINT
#> Dimension:     XY
#> Bounding box:  xmin: -79.7519 ymin: -11.93055 xmax: -70.45341 ymax: -3.87852
#> Geodetic CRS:  WGS 84
#>   objectid_1                 paraje superficie familias_e infraestru nomb_rio_q
#> 1          1 Sector San Pedro-Olmos          0          0                      
#> 2          6          Puente Macabi          0          0                      
#> 3          7      Quebrada La Ronda          0          0                      
#> 4         12   San Pablo De Tushmo.          0          0                      
#> 5         15               Río Virú          0          0                      
#> 6         18         Nuevo Ambiente          0          0                      
#>   vivendas_e fecha_act fecha_doc operador tip_peligr medid_prev descrip
#> 1                   NA        NA          INUNDACIÓN          -        
#> 2                   NA        NA          INUNDACIÓN          -        
#> 3                   NA        NA          INUNDACION                   
#> 4                   NA        NA          INUNDACIÓN          -        
#> 5                   NA        NA          INUNDACIÓN          -        
#> 6                   NA        NA          INUNDACIÓN          -        
#>                                                                                                                observ
#> 1 La información remitida por INGEMMET para el campo de Medidas preventivas fue: S o N, no habiendo mayor descripción
#> 2 La información remitida por INGEMMET para el campo de Medidas preventivas fue: S o N, no habiendo mayor descripción
#> 3                                                                                                                    
#> 4 La información remitida por INGEMMET para el campo de Medidas preventivas fue: S o N, no habiendo mayor descripción
#> 5 La información remitida por INGEMMET para el campo de Medidas preventivas fue: S o N, no habiendo mayor descripción
#> 6 La información remitida por INGEMMET para el campo de Medidas preventivas fue: S o N, no habiendo mayor descripción
#>            fecha_actu id_entidad id_documento url_documento url_imagen
#> 1 Actualizado al 2013         81           NA                         
#> 2 Actualizado al 2013         81           NA                         
#> 3                             77           NA                         
#> 4 Actualizado al 2013         81           NA                         
#> 5 Actualizado al 2013         81           NA                         
#> 6 Actualizado al 2013         81           NA                         
#>                             nombre_entidad ubigeo departamento
#> 1 INSTITUTO GEOLOGICO MINERO Y METALURGICO 140308   LAMBAYEQUE
#> 2 INSTITUTO GEOLOGICO MINERO Y METALURGICO 130206  LA LIBERTAD
#> 3      INSTITUTO NACIONAL DE DEFENSA CIVIL 150118         LIMA
#> 4 INSTITUTO GEOLOGICO MINERO Y METALURGICO 250105      UCAYALI
#> 5 INSTITUTO GEOLOGICO MINERO Y METALURGICO 131201  LA LIBERTAD
#> 6 INSTITUTO GEOLOGICO MINERO Y METALURGICO 160401       LORETO
#>                 provincia       distrito                    geometry
#> 1              LAMBAYEQUE          OLMOS  POINT (-79.7519 -5.987982)
#> 2                  ASCOPE         RAZURI  POINT (-79.3681 -7.716483)
#> 3                    LIMA     LURIGANCHO POINT (-76.67297 -11.93055)
#> 4        CORONEL PORTILLO    YARINACOCHA POINT (-74.59625 -8.346871)
#> 5                    VIRU           VIRU  POINT (-78.72461 -8.46186)
#> 6 MARISCAL RAMON CASTILLA RAMON CASTILLA  POINT (-70.45341 -3.87852)
plot(st_geometry(inundaciones))

# }