|
| 1 | +--- |
| 2 | +title: "betydata" |
| 3 | +subtitle: "Public Data from the BETYdb Database" |
| 4 | +--- |
| 5 | + |
| 6 | +```{r} |
| 7 | +#| echo: false |
| 8 | +library(betydata) |
| 9 | +library(dplyr) |
| 10 | +``` |
| 11 | + |
| 12 | +**betydata** is an R data package providing offline access to public data from [BETYdb](https://betydb.org) (Biofuel Ecophysiological Traits and Yields database). It enables reproducible analyses of plant traits, crop yields, and supporting metadata without requiring database connectivity. |
| 13 | + |
| 14 | +## At a Glance |
| 15 | + |
| 16 | +```{r} |
| 17 | +#| echo: false |
| 18 | +#| label: tbl-overview |
| 19 | +#| tbl-cap: "Dataset summary" |
| 20 | +tibble::tibble( |
| 21 | + Metric = c( |
| 22 | + "Total observations", "Unique traits", "Plant species", |
| 23 | + "Research sites", "Literature citations", "Tables" |
| 24 | + ), |
| 25 | + Value = c( |
| 26 | + format(nrow(traitsview), big.mark = ","), |
| 27 | + n_distinct(traitsview$trait), |
| 28 | + format(nrow(species), big.mark = ","), |
| 29 | + nrow(sites), |
| 30 | + nrow(citations), |
| 31 | + 16 |
| 32 | + ) |
| 33 | +) |> knitr::kable() |
| 34 | +``` |
| 35 | + |
| 36 | +## Installation |
| 37 | + |
| 38 | +```r |
| 39 | +# install.packages("remotes") |
| 40 | +remotes::install_github("PecanProject/betydata") |
| 41 | +``` |
| 42 | + |
| 43 | +## Quick Start |
| 44 | + |
| 45 | +```{r} |
| 46 | +library(betydata) |
| 47 | +library(dplyr) |
| 48 | +
|
| 49 | +# The primary table -- key columns first, IDs last |
| 50 | +traitsview |
| 51 | +
|
| 52 | +# Bioenergy crop observations |
| 53 | +bioenergy_genera <- c("Miscanthus", "Panicum", "Populus", "Salix", "Saccharum") |
| 54 | +traitsview |> |
| 55 | + filter(genus %in% bioenergy_genera) |> |
| 56 | + count(genus, sort = TRUE) |
| 57 | +``` |
| 58 | + |
| 59 | +## Guides |
| 60 | + |
| 61 | +| Guide | Description | |
| 62 | +|-------|-------------| |
| 63 | +| [Getting Started](vignettes/getting_started.qmd) | Package overview, data model, and key concepts | |
| 64 | +| [Common Analyses](vignettes/common_analyses.qmd) | Practical analysis patterns with dplyr | |
| 65 | +| [PFTs & Priors](vignettes/pfts-priors.qmd) | Plant Functional Types and Bayesian prior distributions | |
| 66 | +| [Manuscript Reproduction](vignettes/manuscript.qmd) | Reproduce key analyses from LeBauer et al. (2018) | |
| 67 | + |
| 68 | +## Data License |
| 69 | + |
| 70 | +Data: [ODC-By-1.0](https://opendatacommons.org/licenses/by/1-0/) |
| 71 | +| Code: [BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause) |
| 72 | + |
| 73 | +## Citation |
| 74 | + |
| 75 | +LeBauer, D. S., et al. (2018). BETYdb: a yield, trait, and ecosystem service database applied to second-generation bioenergy feedstock production. *GCB Bioenergy*. [doi:10.1111/gcbb.12420](https://doi.org/10.1111/gcbb.12420) |
0 commit comments