Skip to contents

Downloads the spatial layer of drainage basins of the World available on the Figshare website (https://figshare.com/collections/A_global_database_on_freshwater_fish_species_occurrences_in_drainage_basins/3739145).

Usage

get_drainage_basins_layer(path = ".", overwrite = FALSE, timeout = 60, ...)

Arguments

path

a character of length 1. The path to the folder to save the spatial layer. Note that a subdirectory basins/ will be created.

overwrite

a logical. If TRUE it will override the existing files. Default is FALSE.

timeout

an integer. The timeout for downloading files. Default is 60. This number can be increased for slow Internet connection.

...

other arguments to pass to download.file() (e.g. headers).

Value

No return value. Files will be written in path.

References

Tedesco P et al. (2017) A global database on freshwater fish species occurrence in drainage basins. Scientific Data, 4, 170141. https://doi.org/10.1038/sdata.2017.141.

Examples

if (FALSE) {
## Download drainage basins spatial layer ----
get_drainage_basins_layer(path = "data")
}