ce_download | R Documentation |
ce_download()
brings together the worldclim()
,
chelsa()
and elev()
functions to streamline downloading.
ce_download(
output_dir,
c_source = "WorldClim",
e_source = "mapzen",
var = "all",
location,
...
)
output_dir |
Character (e.g., |
c_source |
Character (e.g., |
e_source |
Character (e.g., |
var |
Character. If supplied will download a subset of the climate data.
Must be one of |
location |
A |
... |
Arguments to control a download from the Internet
|
See documentation from chelsa()
, worldclim()
and
elev()
.
James L. Tsakalos and Martin R. Smith
The underlying functions chelsa()
, worldclim()
and
elev()
.
# Download time will depend on the size of the area you wish to access
# climate data for and your internet connection speed.
# Make a polygon file
regents <- sf::st_polygon(
list(
cbind(
"lon" = c(51.537, 51.525, 51.523, 51.530, 51.534, 51.537),
"lat" = c(-0.150, -0.145, -0.156, -0.167, -0.163, -0.150)
)
)
)
# Create temporary output directory
temp_path <- tempdir()
# Run the download function
ce_download(
output_dir = temp_path,
location = regents
)
# Reset user options
unlink(file.path(temp_path))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.