Skip to contents

download_gaspar() downloads gaspar database from origin to destination.

Usage

download_gaspar(
  destination,
  origin = "georisques",
  name = "gaspar",
  extension = "zip",
  verbose = TRUE
)

Arguments

destination

character, the address where dara are stocked

origin

character, either a keyword or the address from where data are downloaded. Best to keep it at default value.

name

character, vector of acceptable names fo archive to be downloaded

extension

character, vector of acceptable types of archive to be downloaded

verbose

logical, should the function send somme messages while running

Value

If everything got fine the download_gaspar() returns the integer 0, if not it returns an object of class "try-error".

Details

The origin of the data is set by default to https://files.georisques.fr. It can also be downloaded from "cquest" and "opendatarchives" mirrors.

The georisques provider gives no indication of the time of the update of gaspar db. So, if origin does not contain an indication of current day in the format "\ destination as a subirectory of destination.

The destination directory will be created by the function, if missing.

Examples


destination = tempfile()
if (FALSE) download_gaspar(destination)
if (FALSE) download_gaspar(destination, origin = "cquest")
if (FALSE) download_gaspar(tempfile, origin = "opendatarchives")