An example repository showing the standard layout of a
traits.build trait database. Clone it to get started
quickly: it contains two small example datasets already wired into a working build pipeline, so you
can see how raw data, configuration, and metadata come together into a harmonised database and then
adapt the structure for your own data.
traits.build is a data model, workflow, and R package for compiling harmonised ecological trait
databases (it is the engine behind AusTraits). A traits.build database is
just a repository that follows a fixed folder layout; this template is a minimal, runnable instance of
that layout.
For a full, worked walk-through that uses this very template, see the compilation tutorial in the traits.build book.
| Path | Purpose |
|---|---|
config/ |
Database-wide configuration: metadata.yml (database title, version, sources), traits.yml (trait definitions and allowed values), unit_conversions.csv (recognised units and conversions), and taxon_list.csv (the reference taxonomy). |
data/ |
One sub-folder per source dataset (example_dataset_1/, example_dataset_2/), each with a data.csv (the raw study data) and a metadata.yml (how that study maps onto the database's traits, contexts, and metadata). |
R/ |
Project-specific helper code (custom_R_code.R) that individual datasets can call during processing. |
remake.yml |
The build pipeline: it wires the config and per-dataset files together into the final austraits object and exports it to export/data/curr/austraits.rds. This file is auto-generated by traits.build from remake.yml.whisker — edit the whisker source, not remake.yml directly. |
# 1. Clone the template
# git clone https://github.com/traitecoevo/traits.build-template.git
# 2. Install the build engine
# install.packages("remotes")
remotes::install_github("traitecoevo/traits.build")
# 3. Build the database from the repository root
library(traits.build)
remake::make("all")
# The compiled database is the `austraits` object,
# also written to export/data/curr/austraits.rds
austraits <- readRDS("export/data/curr/austraits.rds")Note on build tooling. The pipeline currently uses
remake, which is no longer actively maintained. Thetraits.buildbuild tooling is expected to move totargetsin a future release. The layout above describes current usage; expect theremake.ymlmechanism to change.
If you use traits.build (or this template), please cite:
Wenk E, Bal P, Coleman D, Gallagher R, Yang S, Falster DS (2024) traits.build: A data model, workflow and R package for building harmonised ecological trait databases. Ecological Informatics 83:102773. https://doi.org/10.1016/j.ecoinf.2024.102773
traits.build-template is part of the AusTraits family of packages maintained by the
AusTraits team. See austraits.org for the
project, the data, and the people behind it.
Contributing? Issues across the family are tracked on one board,
AusTraits #9, and new issues are auto-added. Please
read the issue & labelling guide
in austraits-meta — the family's cross-package
knowledge and governance hub — before filing.
AusTraits is made possible by contributions from our partner organisations — the University of New South Wales, Western Sydney University, Botanic Gardens of Sydney, the University of Melbourne, the Atlas of Living Australia, and the Australian Government Department of Climate Change, Energy, the Environment and Water — and from our advisory board, data contributors, and past partners.
AusTraits is a co-investment partnership with the Australian Research Data Commons (ARDC) through the Planet Research Data Commons (DOI: 10.3565/nyk4-4r91). The ARDC is enabled by the Australian Government's National Collaborative Research Infrastructure Strategy (NCRIS).