#set path to EBV netCDF
file <- system.file(file.path("extdata","martins_comcom_subset.nc"), package="ebvcube")
#get all datacubepaths of EBV netCDF
datacubes <- ebv_datacubepaths(file, verbose=FALSE)
#set path to shp file
shp_path <- system.file(file.path("extdata","cameroon.shp"), package="ebvcube")
# \donttest{
#get measurements for full extent and the first three timesteps
data_global <- ebv_analyse(filepath = file, datacubepath = datacubes[1,1],
entity = 1, timestep = 1:3, verbose = FALSE)
#get measurements for subset of Africa only (using bounding box) and one timestep
data_1910 <- ebv_analyse(filepath = file, datacubepath = datacubes[1,1],
entity = 1, timestep = "1900-01-01",
subset = c(-26, 64, 30, 38), verbose = FALSE)
#get measurements for cameroon only (using shp) and one timestep
data_1930 <- ebv_analyse(filepath = file, entity = 1,
timestep = "1930-01-01",
subset = shp_path, verbose = FALSE,
metric = 'Absolute change in the number of species',)
# }
Run the code above in your browser using DataLab