ebv_download {ebvcube}R Documentation

Download an EBV netCDF file

Description

Returns the list of all available data sets at the EBV Portal if you no arguments are given. If an ID is given, the corresponding file (netCDF) and its metadata (json file) will be downloaded to the given output directory.

Usage

ebv_download(id = NULL, outputdir, overwrite = FALSE, verbose = TRUE)

Arguments

id

Integer or Character. There are three option to identify the datase to be downloaded. (1) It can be a single integer value representing the ID of the dataset. (2) It can be a character string representing the title of the data set. (3) It can be a character string representing the DOI of the dataset in the format '10.25829/f2rdp4' (Dataset 'Habitat availability for African great apes' by Jessica Junker from the EBV Data Portal). All three identifier can be retrieved by running ebv_download() without any arguments which returns a data.frame of all available data sets and their title, ID and DOI.

outputdir

Character. Output directory of the downloaded files.

overwrite

Logical. Default: FALSE. Set to TRUE if you want to overwrite the netCDF and json.

verbose

Logical. Default: TRUE. Turn off additional prints by setting it to FALSE.

Value

Downloads a netCDF and json file (metadata) to the given output directory. If run empty returns a data.frame of all available data sets and their title, ID and DOI.

Examples

#get all available datasets
datasets <- ebv_download()


ebv_download(id = datasets$id[1], outputdir =
tempdir(), overwrite=TRUE,
verbose=FALSE)


[Package ebvcube version 0.1.7 Index]