Imagine you wanted to build a database of traits. You might start by compiling data from existing datasets, but you’d quickly find that there are many ways to name and measure the same trait, that different studies use different units, or use an outdated name for a species or taxon.
The traits.build package provides a workflow for harmonising data from disconnected primary sources and arises from the AusTraits project austraits.org. In 2023 this package was spun out as a separate package from the austraits.build repository.
The goals of this package are to:
To handle the harmonising of diverse data sources, we use a reproducible workflow to implement the various changes required for each source to reformat it suitable for incorporation in a harmonised compilation. Such changes include restructuring datasets, renaming variables, changing variable units, changing taxon names.
traits.build workflow, including the required file structure.traits.build is not yet on CRAN. Install it from GitHub:
| Type | Command |
|---|---|
| Release | remotes::install_github("traitecoevo/traits.build@v3.0.0") |
| Development | remotes::install_github("traitecoevo/traits.build") |
The development version comes from the develop branch, the repository’s default. Both also install traits.use, which traits.build depends on.
Version 3.0.0 reads each dataset’s references from a source: block holding a dataset: entry (the dataset’s own reference) and optional source: and secondary: lists. It no longer reads the primary: / secondary_01: / original_01: shape of 2.2.0 and earlier: traits.build::metadata_convert_sources() converts a database’s metadata.yml files. To upgrade a database from 2.2.0, follow the steps in NEWS.md.
traits.build compiles a database; to load, filter, join and plot a compiled one, use traits.use, the reader for any traits.build database. For AusTraits, the austraits package adds load_austraits() (load a release by version number) and a map of Australia on top of traits.use. traits.build re-exports traits.use’s trait-distribution plots, which its dataset reports use.
traits.build.Please read the help guide to learn how best to ask for help using traits.build.
A publication describing the traits.build workflow: > Wenk E, Bal P, Coleman D, Gallagher R, Yang S, Falster D (2024) traits.build: A data model, workflow and R package for building harmonised ecological trait databases. Ecological Informatics 83: 102773. DOI: 10.1016/j.ecoinf.2024.102773
A publication describing the biggest database using the traits.build workflow:
Falster D, Gallagher R, Wenk, E et al. (2021) AusTraits, a curated plant trait database for the Australian flora. Scientific Data 8: 254. DOI: 10.1038/s41597-021-01006-6
traits.build 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).
This work received investment (DP720) from the ARDC.