build_setup_pipeline(method = "base", database_name = "traits.build_database")
source("build.R")
11 Tutorial: Example compilation
This tutorial walks you through an example of creating a traits.build
database from scratch using the traits.build
template. We then look at examples of how to add datasets to the database using the traits.build
workflow.
11.1 Clone traits.build-template
traits.build-template is a GitHub repository that contains:
- Core files required to build your own database:
a sample trait dictionary
a generic database metadata file
a placeholder taxon list
a script of useful R functions
- Two pre-added datasets.
See how metadata is documented in fully propagated metadata files.
Build a skeletal database before adding your own datasets.
- Datasets with explicit tutorials for filling in the dataset metadata files.
The tutorials for these datasets introduce you to the
traits.build
functions.By working through the dataset tutorials, you are progressively introduced to how the complexities of ecological datasets can be documented within the
traits.build
structureThe datasets offer explicit examples of the types of complexities summarised in the Adding Data vignette.
As of September 2023 there are 3 tutorials, but this will expand to 6 tutorials by October 2023.
To clone the repository, either visit the GitHub repository and click on the green <> Code
tab toward the upper right corner of the landing page, or clone the repository through GitHub desktop, R Studio, or your choice of Git client.
11.2 Build the example
Once you have cloned the repository and installed the package, the next step is to build the simplistic sample database:
As described in the chapter on data structure the database is comprised of a series of relational tables and additional lists with metadata.
Once you’ve explored and feel familiar with the basic structure of a traits.build
database, continue onto the tutorials to learn how to add datasets using the traits.build workflow.