The following treatments are performed:

  • If no sufficient versions are found, nothing is done.

  • NA values are consistently set.

  • Type of fields are consistently set, some checks are performed on transformations.

  • Data set is cut and saved by departments

  • Only observations with spatial coordinates are kept.

  • Exposition of observations (belonging or not to eaip) is added.

alert_gaspar(origin, current, past, scope, alert = TRUE, verbose = TRUE)

Arguments

origin

character, path to the directory where archive are stored.

current

character, date of the current data;

past

character, date of the past data.

scope

list, named list of scope (vector of commune).

alert

logical, should the result be returned.

verbose

logical, should the function give some sumup informations.

Value

if retrieve = TRUE, data.frame of adapated data stored in archive.

Author

Frédéric Grelot

Examples


if (FALSE) {
origin = "data-local/georisques/gaspar"
download_gaspar(file.path(origin, Sys.Date()))
catnat = adapt_gaspar(file.path(origin, Sys.Date()), scope = list("so_ii" = so.ii::so_ii_scope))
alert_gaspar(origin, scope = "so_ii")
}