Skip to contents

The various `download_something_tables()` functions allow to retrieve the Environment90m variable names and download data of the Environment90m datasets, which are split into 20°x20° tiles.

There are basically 3 usages:

(1) If the functions are called without arguments (i.e. without specifying variable names and tiles), the available variable names are returned.

(2) If a subset of variables and tile IDs are specified, the download size of the resulting download will be computed.

(3) If a subset of variables and tile IDs are specified, and `download` is set to `TRUE`, the requested tables will be downloaded and either left as zipped files or unzipped to text files.

Multiple regular tiles, e.g. belonging to regional units, can be downloaded in a single request. The tile IDs can be obtained using the function [get_tile_id()].

Usage

download_soil_tables(
  subset = NULL,
  tile_ids = NULL,
  download = FALSE,
  download_dir = ".",
  file_format = "txt",
  delete_zips = TRUE,
  ignore_missing = FALSE,
  tempdir = NULL,
  quiet = FALSE
)

download_flo1k_tables(
  subset = NULL,
  tile_ids = NULL,
  download = FALSE,
  download_dir = ".",
  file_format = "txt",
  delete_zips = TRUE,
  ignore_missing = FALSE,
  tempdir = NULL,
  quiet = FALSE
)

download_cgiar_tables(
  subset = NULL,
  tile_ids = NULL,
  download = FALSE,
  download_dir = ".",
  file_format = "txt",
  delete_zips = TRUE,
  ignore_missing = FALSE,
  tempdir = NULL,
  quiet = FALSE
)

download_merit_dem_tables(
  subset = NULL,
  tile_ids = NULL,
  download = FALSE,
  download_dir = ".",
  file_format = "txt",
  delete_zips = TRUE,
  ignore_missing = FALSE,
  tempdir = NULL,
  quiet = FALSE
)

download_hydrography90m_tables(
  subset = NULL,
  tile_ids = NULL,
  download = FALSE,
  download_dir = ".",
  file_format = "txt",
  delete_zips = TRUE,
  ignore_missing = FALSE,
  tempdir = NULL,
  quiet = FALSE
)

download_observed_climate_tables(
  subset = NULL,
  tile_ids = NULL,
  download = FALSE,
  download_dir = ".",
  file_format = "txt",
  delete_zips = TRUE,
  ignore_missing = FALSE,
  tempdir = NULL,
  quiet = FALSE
)

download_projected_climate_tables(
  base_vars = NULL,
  time_periods = NULL,
  models = NULL,
  scenarios = NULL,
  versions = NULL,
  subset = NULL,
  tile_ids = NULL,
  download = FALSE,
  download_dir = ".",
  file_format = "txt",
  delete_zips = TRUE,
  ignore_missing = FALSE,
  tempdir = NULL,
  quiet = FALSE
)

download_landcover_tables(
  base_vars = NULL,
  years = NULL,
  subset = NULL,
  tile_ids = NULL,
  download = FALSE,
  download_dir = ".",
  file_format = "txt",
  delete_zips = TRUE,
  ignore_missing = FALSE,
  tempdir = NULL,
  quiet = FALSE
)

Arguments

subset

Vector of the variable names that should be downloaded (or string "ALL" for all available variables).

tile_ids

Vector containing all tile ids of the tiles (e.g. "h10v04") that should be downloaded, or whose download availability and size should be checked(or string "ALL" for all available tiles).

download

logical. If TRUE, and if `tile_ids` is specified, the files will be downloaded from the IGB server. If FALSE, and if `tile_ids` is specified, the download size will be computed. If FALSE, and if `tile_ids` is NULL, the variable names will be returned to the user.

download_dir

Directory where the downloads should be stored. Defaults to the current working directory ".". Ignored if `download=FALSE`.

file_format

File format of the tables, either "txt" or "zip". If "txt", then the zipped tables are unzipped. If "zip", the downloaded zipped files are left as they are. Default is "txt", which means that the zip files are unzipped after downloading. Note that this will take more space on disk than zips.

delete_zips

logical. boolean If `FALSE`, the downloaded zip files are not deleted after unzipping. Defaults to TRUE. This is ignored if you request file format zip.

ignore_missing

logical. What to do if some of the requested variables and/or tile_ids are not available, which is most frequently caused by a typo the variable name. If TRUE, the missing or misspelled ones are ignored while the others are downloaded (and a warning is given out). If FALSE, the function will fail to allow the user to check the variable names and their spelling. Defaults to FALSE.

tempdir

Optional (rarely needed). Path to the directory where to store/look for the temporary various file size tables for the various Environment90m datasets, which are required and downloaded by the functions. If not passed, defaults to the output of [base::tempdir()].

quiet

logical. If FALSE, informative messages will be printed. Default is FALSE.

base_vars

(Only in `download_projected_climate_tables()` and `download_landcover_tables()`) Vector of the desired base variables, e.g. the landcover variable "c20_1992" can be expressed as base variable "c20" and year "1992".

time_periods

(Only in `download_projected_climate_...`) Vector of the desired time periods (leave `NULL` or specify `"ALL"` for all available time periods).

models

(Only in `download_projected_climate_...`) Vector of the desired models (leave `NULL` or specify `"ALL"` for all available models).

scenarios

(Only in `download_projected_climate_...`) Vector of the desired scenarios (leave `NULL` or specify `"ALL"` for all available scenarios).

versions

(Only in `download_projected_climate_...`) Vector of the desired versions (leave `NULL` or specify `"ALL"` for all available versions). As of January 2025, the only available version is "V.2.1".

years

(Only in `download_landcover_...`) Vector of the desired years (leave `NULL` or specify `"ALL"` for all available years).

Value

A named list of: * variable names, * components of variable names (if applies), * the dataset name, * the requested tile_ids (if applies), * the download size (if `tile_id` is specified), * the path where downloaded files are stored to (if `download=TRUE`), * etc.

Details

In the following table you can find all the variables included in the Environment90m dataset. The column "Variable" includes the variable names that should be used as an input in the parameter "variable" of the function. Likewise, the column "File format" contains the input that should be given to the "file_format" parameter.

The Environment90m dataset comprises data from the landcover dataset ESA Land Cover (esa_cci_landcover_v2_1_1), CHELSA v2.1 (chelsa_bioclim_v2_1), SOILGRIDS (soilgrids250m_v2_0) and Hydrography90m (hydrography90m_v1_0).

For visualisations the available tiles, and for details on the variables of the Hydrography90m dataset, please refer to https://hydrography.org/hydrography90m/hydrography90m_layers/.

For details on the bioclimatic variables, especially for details of the scale and unit of the values, please refer to http://chelsa-climate.org/.

For details on the ESA Land Cover variables, please refer to https://www.climatologylab.org/terraclimate.html. Please note that some values in this dataset are aggregated from similar classes (see Environment90m publication).

For details on the Soil data, please refer to https://soilgrids.org.

Functions

  • download_soil_tables(): Download SOILGRIDS tables (soilgrids250m_v2_0)

  • download_flo1k_tables(): Download flow tables (flo1k_v1_0)

  • download_cgiar_tables(): Download CGIAR-CSI tables (cgiar_csi_v3)

  • download_merit_dem_tables(): Download MERIT-DEM tables (Multi-Error-Removed Improved-Terrain Digital Elevation Model, merit_dem_v1_0_3)

  • download_hydrography90m_tables(): Download Hydrography90m tables (hydrography90m_v1_0)

  • download_observed_climate_tables(): Download CHELSA bioclimatic variables tables, except for projections (Climatologies at high resolution for the earth’s land surface areas, chelsa_bioclim_v2_1)

  • download_projected_climate_tables(): Download CHELSA bioclimatic variables, tables, projections only (Climatologies at high resolution for the earth’s land surface areas, chelsa_bioclim_v2_1)

  • download_landcover_tables(): Download ESA Land Cover tables (esa_cci_landcover_v2_1_1)

References

Garcia Marquez J., Amatulli, G., Grigoropoulou, A., Schürz, M., Tomiczek, T., Buurman, M., Bremerich, V., Bego, K. and Domisch, S.: Global datasets of aggregated environmental variables at the sub-catchment scale for freshwater biodiversity modeling, in prep. Please contact the authors for more up-to-date citation info.

See also

[download_tiles()] for downloading spatial layers (raster, vector) of the original Hydrography90m dataset, split to the same tiles.

Author

Merret Buurman

Examples


### Soil: soilgrids250m_v2_0 ###
# Show all available soil variable names:
download_soil_tables()

# Compute download size of all soil variables, for one tile:
download_soil_tables(
  subset = "ALL",
  tile_ids = c("h00v04"),
  download = FALSE)

# Download one soil variable (Clay content), for two tiles:
if (FALSE) { # \dontrun{
download_soil_tables(
  subset = c("clyppt"),
  tile_ids = c("h00v04", "h10v04"),
  download = TRUE,
  download_dir = ".",
  file_format = "zip")
} # }

# Download one soil variable (Clay content), for one tile,
# unzip, and delete the zips:
if (FALSE) { # \dontrun{
download_soil_tables(
  subset = c("clyppt"),
  tile_ids = c("h00v04"),
  download = TRUE,
  download_dir = ".",
  file_format = "txt",
  delete_zips = TRUE) 
} # }


### Flow (mean): flo1k_v1_0 ###
# Show all available flo1k variable names:
download_flo1k_tables()

# Compute download size of the only flo1k_v1_0 variable (mean flow),
# for one tile:
if (FALSE) { # \dontrun{
download_flo1k_tables(
  subset = "ALL",
  tile_ids = c("h00v04"),
  download = FALSE)
} # }

# Download the only flo1k_v1_0 variable (flo1k), for two tiles:
if (FALSE) { # \dontrun{
download_soil_tables(
  subset = c("flo1k"),
  tile_ids = c("h00v04", "h10v04"),
  download = TRUE,
  download_dir = ".",
  file_format = "zip")
} # }

# Download the only flo1k_v1_0 variable (flo1k), for one tile,
# unzip, and delete the zips:
if (FALSE) { # \dontrun{
download_soil_tables(
  subset = c("flo1k"),
  tile_ids = c("h00v04"),
  download = TRUE,
  download_dir = ".",
  file_format = "txt",
  delete_zips = TRUE)
} # }


### CGIAR CSI dataset: cgiar_csi_v3 ###
# Show all available cgiar variable names
download_cgiar_tables()

# Compute download size of all cgiar variables, for one tile:
download_cgiar_tables(
  subset = "ALL",
  tile_ids = c("h00v04"),
  download = FALSE)

# Download one cgiar variable (Global Aridity Index), for two tiles:
if (FALSE) { # \dontrun{
download_cgiar_tables(
  subset = c("garid"),
  tile_ids = c("h00v04", "h10v04"),
  download = TRUE,
  download_dir = ".",
  file_format = "zip")
} # }

# Download two cgiar variables (Global Aridity Index, Potential
# Evapotranspiration), for one tile, unzip, and delete the zips:
if (FALSE) { # \dontrun{
download_cgiar_tables(
  subset = c("garid", "gevapt"),
  tile_ids = c("h00v04"),
  download = TRUE,
  download_dir = ".",
  file_format = "txt",
  delete_zips = TRUE)
} # }


### Digital Elevation Model: merit_dem_v1_0_3 ###
# (Multi-Error-Removed Improved-Terrain Digital Elevation Model)
# Show all available merit_dem_v1_0_3 variable names
download_merit_dem_tables()

# Compute download size of the only merit_dem_v1_0_3 variable
# (Mean elevation), for one tile:
download_merit_dem_tables(
  subset = "ALL",
  tile_ids = c("h00v04"),
  download = FALSE)

# Download the only merit_dem_v1_0_3 variable (mean elevation),
# for two tiles:
if (FALSE) { # \dontrun{
download_merit_dem_tables(
  subset = c("elev"), # or "ALL"
  tile_ids = c("h00v04", "h10v04"),
  download = TRUE,
  download_dir = ".",
  file_format = "zip")
} # }

# Download the only merit_dem_v1_0_3 variable (mean elevation),
# for one tile, unzip, and delete the zips:
if (FALSE) { # \dontrun{
download_merit_dem_tables(
  subset = c("elev"),
  tile_ids = c("h00v04"),
  download = TRUE,
  download_dir = ".",
  file_format = "txt",
  delete_zips = TRUE)
} # }


### Hydrography90m: hydrography90m_v1_0 ###
# Show all available hy90m variable names
download_hydrography90m_tables()

# Compute download size of all hy90m variables, for one tile:
download_hydrography90m_tables(
  subset = "ALL",
  tile_ids = c("h00v04"),
  download = FALSE)

# Download one hy90m variable (Strahler’s stream order), for two tiles:
if (FALSE) { # \dontrun{
download_hydrography90m_tables(
  subset = c("stream_strahler"),
  tile_ids = c("h00v04", "h10v04"),
  download = TRUE,
  download_dir = ".",
  file_format = "zip")
} # }

# Download one hy90m variable (Strahler’s stream order), for one tile,
# unzip, and delete the zips:
if (FALSE) { # \dontrun{
download_hydrography90m_tables(
  subset = c("stream_strahler"),
  tile_ids = c("h00v04"),
  download = TRUE,
  download_dir = ".",
  file_format = "txt",
  delete_zips = TRUE) 
} # }

### Bioclimatic Variables: chelsa_bioclim_v2_1 ###
### (excluding projections)                    ###
# Show all available bioclim variable names
# (excluding projections):
download_observed_climate_tables()

# Compute download size of all bioclim variables, for one tile:
download_observed_climate_tables(
  subset = "ALL",
  tile_ids = c("h00v04"),
  download = FALSE)

# Download one bioclim variable (Annual mean temperature), for two tiles:
if (FALSE) { # \dontrun{
download_observed_climate_tables(
  subset = c("bio1"),
  tile_ids = c("h00v04", "h10v04"),
  download = TRUE,
  download_dir = ".",
  file_format = "zip")
} # }

# Download one bioclim variable (Annual mean temperature), for one tile,
# unzip, and delete the zips:
if (FALSE) { # \dontrun{
download_observed_climate_tables(
  subset = c("bio1"),
  tile_ids = c("h00v04"),
  download = TRUE,
  download_dir = ".",
  file_format = "txt",
  delete_zips = TRUE)
} # }


### Bioclimatic Variables: chelsa_bioclim_v2_1 ###
### (projections only)                         ###
# Show all available projected bioclim variable names
download_projected_climate_tables()

# Compute download size of all variables, for one tile:
download_projected_climate_tables(
  subset = "ALL",
  tile_ids = c("h00v04"),
  download = FALSE)

# Download one variable (Annual mean temperature), for two tiles:
if (FALSE) { # \dontrun{
download_projected_climate_tables(
  subset = c("bio1"),
  tile_ids = c("h00v04", "h10v04"),
  download = TRUE,
  download_dir = ".",
  file_format = "zip")
} # }

# Download one variable (Annual mean temperature), for one tile,
# unzip, and delete the zips:
if (FALSE) { # \dontrun{
download_projected_climate_tables(
  subset = c("bio1_2071-2100_ukesm1-0-ll_ssp585_V.2.1"),
  tile_ids = c("h00v04"),
  download = TRUE,
  download_dir = ".",
  file_format = "txt",
  delete_zips = TRUE) 
} # }


### Landcover: esa_cci_landcover_v2_1_1 ###
# Show all available landcover variable names:
download_landcover_tables()

# Compute download size of two landcover base variables (Cropland, rainfed,
# and Grassland) and two years, for all tiles:
  vars <- download_landcover_tables(
    base_vars=c("c10", "c130"),
    years=c(1992, 1993),
    tile_ids="ALL")

# Download two base variables and one year, for two tiles:
if (FALSE) { # \dontrun{
  vars <- download_landcover_tables(
    base_vars=c("c10", "c130"),
    years=c(1992),
    tile_ids=c("h00v04", "h10v04"),
    download=TRUE,
    download_dir="/tmp",
    file_format="zip",
    delete_zips=FALSE)
} # }