Adapt gaspar database
adapt_gaspar.Rd
The following treatments are performed:
data is adapated consistently with theme
only data corresponding to flood hazards are kept
if scope is given, a subpart of data is also saved
Usage
adapt_gaspar(
origin,
destination = origin,
archive = "gaspar.zip",
theme = "catnat",
version,
scope = NULL,
export = "rds",
retrieve = FALSE,
keep = FALSE,
verbose = TRUE
)
Arguments
- origin
character, path to the directory where archive are stored.
- destination
character, path to the directory where results should be saved
- archive
character, vector of archive to be adpated
- theme
character, name of the theme to be treated
- version
character, version of data to be treated. If missing, version is guessed from folders in origin.
- scope
list, named list of scope (vector of commune)
- export
character, option for export format of the results
- retrieve
logical, should the result be returned
- keep
logical, should the original data be kept. Default to FALSE.
- verbose
logical, should the function give some sumup informations. Default to TRUE.
Examples
if (FALSE) {
origin = "data-local/georisques/gaspar"
adapt_gaspar(file.path(origin))
adapt_gaspar(file.path(origin, "2022-02-28"), scope = list("so_ii" = so.ii::so_ii_scope))
}