-
Notifications
You must be signed in to change notification settings - Fork 1
/
tutorial_compilation.qmd
45 lines (27 loc) · 2.71 KB
/
tutorial_compilation.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# 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.
## Clone traits.build-template
[traits.build-template](https://github.com/traitecoevo/traits.build-template) is a GitHub repository that contains:
1. Core files required to build your own database:
- a sample [trait dictionary](https://github.com/traitecoevo/traits.build-template/blob/master/config/traits.yml)
- a [unit conversions file](https://github.com/traitecoevo/traits.build-template/blob/master/config/unit_conversions.csv)
- a generic [database metadata file](https://github.com/traitecoevo/traits.build-template/blob/master/config/metadata.yml)
- a placeholder [taxon list](https://github.com/traitecoevo/traits.build-template/blob/master/config/taxon_list.csv)
- a script of useful [R functions](https://github.com/traitecoevo/traits.build-template/blob/master/R/custom_R_code.R)
2. Two pre-added datasets.
- See how metadata is documented in fully propagated metadata files.
- Build a skeletal database before adding your own datasets.
3. 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` structure
- The datasets offer explicit examples of the types of complexities summarised in the [Adding Data](https://github…) 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](https://github.com/traitecoevo/traits.build-template), or clone the repository through GitHub desktop, R Studio, or your choice of Git client.
## Build the example
Once you have cloned the repository and installed the package, the next step is to build the simplistic sample database:
```{r, eval=FALSE}
build_setup_pipeline(method = "base", database_name = "traits.build_database")
source("build.R")
```
As described in the chapter on [data structure](database_structure.html) 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.