From Raster to Portal: Creating and Publishing an EBVCube

A tutorial on the ebvcube R package and the EBV Data Portal

Author
Affiliation

Emmanuel Oceguera-Conchas

German Centre for Integrative Biodiversity Research (iDiv)

Published

September 1, 2026

Overview

Learn how to turn gridded biodiversity data into an EBVCube: a reusable file that can be checked, shared and published through the EBV Data Portal.

New to this?
Eight units take you from the EBV framework and EBVCube concepts to creating, validating and publishing a dataset. Unit 1 — Introduction introduces the terminology used throughout the tutorial; if you already know the EBV framework, you can jump straight to any unit below.

R ≥ 4.2 · 3.3 MB example download · no prior netCDF experience needed

Four names to keep separate

An Essential Biodiversity Variable (EBV) is a standardised measurement used to describe and track an important aspect of biodiversity. An EBVCube is the standardised file that stores gridded EBV data and the information needed to interpret it. ebvcube is the R package used to inspect, read, visualise and create EBVCubes. The EBV Data Portal is the online service where datasets can be discovered, submitted, published and explored.

Four dimensions, one file

An EBVCube shown as three stacked boxes, one per entity: All birds, Forest birds and Non-forest birds. The front face of each box is a world map, with longitude running horizontally and latitude vertically; time runs back along the depth axis.

EBVCubes use netCDF, a file format designed for multidimensional scientific data. The format keeps data values, their geographic and temporal coordinates, and descriptive metadata together in one self-describing file. It follows the Climate and Forecast (CF) and Attribute Convention for Data Discovery (ACDD) conventions, plus EBVCube-specific biodiversity terms. This common structure makes datasets easier to discover, interpret and exchange.

The figure uses the tutorial’s bird-diversity example to illustrate this structure. Each box represents one biological entity. It contains values on the same global grid, with time running along the depth axis.

Longitude (lon)

The east–west coordinate of the spatial grid. Its values are determined by the spatial extent and resolution of your data.

Latitude (lat)

The north–south coordinate of the spatial grid. Every layer added to the cube must use the same grid and coordinate reference system.

Time (time)

The date or dates represented by the data. The values declared in the metadata must match the layers you add to the cube.

Entity (entity)

The biological unit represented by the data: for example, a species, a group of species, or an ecosystem type.

Metrics and scenarios are not dimensions. They organise the four-dimensional data cubes inside an EBVCube.

A metric is what is measured, for example species richness, the relative change in species richness, or its uncertainty. Each metric group contains one four-dimensional data array named ebv_cube, with the dimensions lon, lat, time and entity.

A scenario is an optional higher-level group, normally used for projected data. For example, the same metric may be modelled under several alternative future land-use pathways. When scenarios are present, each metric is stored separately within each scenario: scenario_1/metric_1/ebv_cube.

If a dataset has 3 scenarios and 3 metrics, it therefore contains 9 scenario–metric combinations and 9 ebv_cube data arrays. All of these cubes use the same four-dimensional structure.

From concepts to publication

First, you learn the terms and file structure. You then prepare and validate an EBVCube locally in R, and use the portal to publish it. Metadata can be prepared either through the portal form or in R; both routes produce the same JSON file used to create the EBVCube.

%%{init: {"flowchart": {"htmlLabels": false}} }%%
flowchart LR
  A("Unit 1<br/>Understand EBVs and EBVCubes")
  B("Units 2–5<br/>Create and validate an EBVCube in R")
  C("Unit 6<br/>Publish on the EBV Data Portal")
  A --> B --> C
  classDef concept fill:#E8F1F8,stroke:#4E7894,color:#12211F
  classDef rstep   fill:#E8F1EA,stroke:#2F6F4E,color:#12211F
  classDef pstep   fill:#FBF0DF,stroke:#B57728,color:#12211F
  class A concept
  class B rstep
  class C pstep
  linkStyle default stroke:#9AA5A0,stroke-width:1.5px

One real dataset, start to finish

This published dataset illustrates how an EBVCube stores several scenarios and metrics. The later units identify the exact example inputs used in their code; the same creation workflow can be applied to your own data.

Global trends in biodiversity (BES-SIM cSAR-iDiv)

id = 30 Community composition 3 entities 3 metrics 3 scenarios 1900 · 2015 · 2050

Bird species richness on a 1° global grid, modelled with cSAR-iDiv for all birds, forest birds and non-forest birds, under three SSP-RCP land-use scenarios. Roughly 3.3 MB, downloaded once and cached locally.

Martins, I., Pereira, H. (2022). Dataset page · DOI 10.25829/5zmy41

library(ebvcube)

ebv_download(id = 30, outputdir = tempdir(), overwrite = FALSE)

Keep this example in mind as you learn the workflow: its nine scenario–metric combinations show how several four-dimensional data cubes can coexist in one file. To create your own EBVCube, replace the example metadata and data where the units indicate. Your entities, metrics, scenarios, dimensions and metadata may differ.

How this tutorial is organised

Each unit opens with clear objectives, works through the topic with runnable code and screenshots, and closes with a checkpoint so you know what you should have completed before moving on.

UNIT 1
Introduction

The EBV framework, EBVCube structure, key terminology and the role of the portal.

UNIT 2
Installation

Get R, ebvcube and its Bioconductor dependencies running.

UNIT 3
Preparing data

Prepare your spatial data, entity list and metadata JSON for the EBVCube workflow.

UNIT 4
Creating the EBVCube

Create the EBVCube, add your data, and verify its structure.

UNIT 5
Validating and visualising

Check the cube’s structure, metadata and data before uploading it.

UNIT 6
Uploading

Upload your EBVCube, submit it for review, and publish it with a DOI.

UNIT 7
Troubleshooting

What to do when a step refuses to work.

UNIT 8
Resources and references

Specifications, papers, and where to ask.

Before you start

You do not need prior knowledge of EBVs, netCDF files or the EBV Data Portal. Unit 1 introduces the concepts and vocabulary used throughout the tutorial.

It helps to be comfortable with:

  • basic R: installing packages and running scripts;
  • basic geospatial data handling in R, using packages such as terra;
  • biodiversity raster data, if you want to create your own EBVCube rather than follow the example.

A free GEO BON account is needed if you use the portal’s metadata form or submit a dataset for publication. It is not needed to read public datasets or follow the R-only metadata workflow.

Key resources