11# Dataset documentation for betydata package
22
3- # ' Traits and Yields from BETYdb
3+ # ' Traits and yields from BETYdb
44# '
55# ' A denormalized view combining plant trait measurements and crop yield data
66# ' from the BETYdb database. This is the primary dataset for offline analysis.
77# '
8- # ' @format A data frame with 43,532 rows and 36 columns:
9- # ' \describe{
10- # ' \item{checked}{Data quality flag: 0 = unchecked, 1 = verified, -1 = flagged (excluded)}
11- # ' \item{result_type}{Type of measurement: "traits" or "yields"}
12- # ' \item{id}{Unique identifier for the trait or yield record}
13- # ' \item{citation_id}{Foreign key to citations table}
14- # ' \item{site_id}{Foreign key to sites table}
15- # ' \item{treatment_id}{Foreign key to treatments table}
16- # ' \item{sitename}{Name of the research site}
17- # ' \item{city}{City or region where site is located}
18- # ' \item{lat, lon}{Site coordinates (decimal degrees)}
19- # ' \item{scientificname}{Species scientific name (Genus species)}
20- # ' \item{commonname}{Species common name}
21- # ' \item{genus}{Taxonomic genus}
22- # ' \item{species_id}{Foreign key to species table}
23- # ' \item{cultivar_id}{Foreign key to cultivars table (may be NA)}
24- # ' \item{author}{Citation author(s)}
25- # ' \item{citation_year}{Year of publication}
26- # ' \item{treatment}{Experimental treatment name}
27- # ' \item{date}{Formatted measurement date (human-readable)}
28- # ' \item{time}{Time of measurement or confidence indicator}
29- # ' \item{raw_date}{Raw timestamp from database}
30- # ' \item{month, year}{Extracted month and year}
31- # ' \item{dateloc}{Date location confidence (1-9 scale)}
32- # ' \item{trait}{Variable/trait name (e.g. "SLA", "Vcmax", "Ayield")}
33- # ' \item{trait_description}{Description of the trait/variable}
34- # ' \item{mean}{Mean value of the measurement}
35- # ' \item{units}{Units of measurement}
36- # ' \item{n}{Sample size}
37- # ' \item{statname}{Type of uncertainty statistic (SE, SD, etc.)}
38- # ' \item{stat}{Value of the uncertainty statistic}
39- # ' \item{notes}{Additional notes}
40- # ' \item{access_level}{Data access level (4 = public)}
41- # ' \item{cultivar}{Cultivar name if applicable}
42- # ' \item{entity}{Entity name (for repeated measures)}
43- # ' \item{method_name}{Measurement method name}
44- # ' }
45- # ' @source \url{https://betydb.org}, exported from traits_and_yields_view
8+ # ' @format A data frame with trait and yield observations.
9+ # ' Use `names(traitsview)` to see all columns. Key columns include
10+ # ' checked (quality flag), result_type, id, mean, units, trait, and scientificname.
11+ # ' @source <https://betydb.org>, exported from traits_and_yields_view
4612# ' @seealso [species], [sites], [variables], [citations]
4713# ' @examples
4814# ' head(traitsview)
49- # '
50- # ' # Count by trait
51- # ' if (requireNamespace("dplyr", quietly = TRUE)) {
52- # ' dplyr::count(traitsview, trait, sort = TRUE)
53- # ' }
15+ # ' names(traitsview)
5416" traitsview"
5517
5618# ' Species taxonomy from BETYdb
5719# '
58- # ' Taxonomic information for plant species in BETYdb.
59- # '
60- # ' @format A data frame with columns including:
61- # ' \describe{
62- # ' \item{id}{Species identifier}
63- # ' \item{spcd}{Species code}
64- # ' \item{genus}{Taxonomic genus}
65- # ' \item{species}{Specific epithet}
66- # ' \item{scientificname}{Full scientific name}
67- # ' \item{commonname}{Common name(s)}
68- # ' }
69- # ' @source \url{https://betydb.org}
20+ # ' Taxonomic information for plant species in BETYdb including USDA PLANTS
21+ # ' database attributes.
22+ # '
23+ # ' @format A data frame. Key columns include id, genus, species, scientificname,
24+ # ' commonname. See `names(species)` for all columns.
25+ # ' @source <https://betydb.org>
7026" species"
7127
7228# ' Research sites from BETYdb
7329# '
7430# ' Geographic and metadata for research sites.
7531# '
76- # ' @format A data frame with columns including:
77- # ' \describe{
78- # ' \item{id}{Site identifier}
79- # ' \item{sitename}{Site name}
80- # ' \item{city, state, country}{Location}
81- # ' \item{lat, lon}{Coordinates (decimal degrees)}
82- # ' \item{mat, map}{Mean annual temperature and precipitation}
83- # ' }
84- # ' @source \url{https://betydb.org}
32+ # ' @format A data frame. Key columns include id, sitename, city, state, country.
33+ # ' See `names(sites)` for all columns.
34+ # ' @source <https://betydb.org>
8535" sites"
8636
8737# ' Variable definitions from BETYdb
8838# '
8939# ' Definitions and metadata for measured variables/traits.
9040# '
91- # ' @format A data frame with columns including:
92- # ' \describe{
93- # ' \item{id}{Variable identifier}
94- # ' \item{name}{Variable name (e.g., "SLA", "Vcmax")}
95- # ' \item{description}{Full description}
96- # ' \item{units}{Standard units}
97- # ' \item{min, max}{Valid range}
98- # ' }
99- # ' @source \url{https://betydb.org}
41+ # ' @format A data frame. Key columns include id, name, description, units.
42+ # ' See `names(variables)` for all columns.
43+ # ' @source <https://betydb.org>
10044" variables"
10145
10246# ' Literature citations from BETYdb
10347# '
10448# ' Bibliographic references for data sources.
10549# '
106- # ' @format A data frame with columns including:
107- # ' \describe{
108- # ' \item{id}{Citation identifier}
109- # ' \item{author}{Author(s)}
110- # ' \item{year}{Publication year}
111- # ' \item{title}{Article/book title}
112- # ' \item{journal}{Journal name}
113- # ' \item{doi}{Digital Object Identifier}
114- # ' }
115- # ' @source \url{https://betydb.org}
50+ # ' @format A data frame. Key columns include id, author, year, title, journal, doi.
51+ # ' See `names(citations)` for all columns.
52+ # ' @source <https://betydb.org>
11653" citations"
11754
11855# ' Plant cultivars from BETYdb
56+ # '
11957# ' @format A data frame with cultivar information.
120- # ' @source \url{https://betydb.org}
58+ # ' See `names(cultivars)` for all columns.
59+ # ' @source <https://betydb.org>
12160" cultivars"
12261
12362# ' Measurement methods from BETYdb
63+ # '
12464# ' @format A data frame with method descriptions.
125- # ' @source \url{https://betydb.org}
65+ # ' See `names(methods)` for all columns.
66+ # ' @source <https://betydb.org>
12667" methods"
12768
12869# ' Experimental treatments from BETYdb
70+ # '
12971# ' @format A data frame with treatment definitions.
130- # ' @source \url{https://betydb.org}
72+ # ' See `names(treatments)` for all columns.
73+ # ' @source <https://betydb.org>
13174" treatments"
13275
13376# ' Plant Functional Types (PFTs) from BETYdb
13477# '
13578# ' PFT definitions used for grouping species for modeling.
13679# '
137- # ' @format A data frame with columns including:
138- # ' \describe{
139- # ' \item{id}{PFT identifier}
140- # ' \item{name}{PFT name (e.g. "temperate.deciduous")}
141- # ' \item{definition}{Full definition}
142- # ' }
143- # ' @source \url{https://betydb.org}
80+ # ' @format A data frame. Key columns include id, name, definition.
81+ # ' See `names(pfts)` for all columns.
82+ # ' @source <https://betydb.org>
14483# ' @seealso [pfts_species], [pfts_priors]
14584" pfts"
14685
14786# ' Prior distributions from BETYdb
14887# '
14988# ' Prior probability distributions for Bayesian analysis.
15089# '
151- # ' @format A data frame with columns including:
152- # ' \describe{
153- # ' \item{id}{Prior identifier}
154- # ' \item{variable_id}{Associated variable}
155- # ' \item{distn}{Distribution type (e.g. "norm", "gamma")}
156- # ' \item{parama, paramb, paramc}{Distribution parameters}
157- # ' }
158- # ' @source \url{https://betydb.org}
90+ # ' @format A data frame. Key columns include id, variable_id, distn, parama, paramb.
91+ # ' See `names(priors)` for all columns.
92+ # ' @source <https://betydb.org>
15993# ' @seealso [pfts_priors], [variables]
16094" priors"
16195
16296# ' Management practices from BETYdb
97+ # '
16398# ' @format A data frame with management event data.
164- # ' @source \url{https://betydb.org}
99+ # ' See `names(managements)` for all columns.
100+ # ' @source <https://betydb.org>
165101" managements"
166102
167103# ' Entities from BETYdb
104+ # '
168105# ' @format A data frame with entity (individual/plot) information.
169- # ' @source \url{https://betydb.org}
106+ # ' See `names(entities)` for all columns.
107+ # ' @source <https://betydb.org>
170108" entities"
171109
172110# ' PFT-Species mapping from BETYdb
173111# '
174112# ' Many-to-many relationship linking PFTs to species.
175113# '
176- # ' @format A data frame with columns:
177- # ' \describe{
178- # ' \item{pft_id}{Foreign key to pfts}
179- # ' \item{specie_id}{Foreign key to species}
180- # ' }
181- # ' @source \url{https://betydb.org}
114+ # ' @format A data frame with columns pft_id and specie_id (plus metadata).
115+ # ' See `names(pfts_species)` for all columns.
116+ # ' @source <https://betydb.org>
182117" pfts_species"
183118
184119# ' PFT-Prior mapping from BETYdb
185120# '
186121# ' Many-to-many relationship linking PFTs to priors.
187122# '
188- # ' @format A data frame with columns:
189- # ' \describe{
190- # ' \item{pft_id}{Foreign key to pfts}
191- # ' \item{prior_id}{Foreign key to priors}
192- # ' }
193- # ' @source \url{https://betydb.org}
123+ # ' @format A data frame with columns pft_id and prior_id (plus metadata).
124+ # ' See `names(pfts_priors)` for all columns.
125+ # ' @source <https://betydb.org>
194126" pfts_priors"
195127
196128# ' Management-Treatment mapping from BETYdb
197129# '
198130# ' Many-to-many relationship linking managements to treatments.
199131# '
200- # ' @format A data frame with columns:
201- # ' \describe{
202- # ' \item{management_id}{Foreign key to managements}
203- # ' \item{treatment_id}{Foreign key to treatments}
204- # ' }
205- # ' @source \url{https://betydb.org}
132+ # ' @format A data frame with columns management_id and treatment_id (plus metadata).
133+ # ' See `names(managements_treatments)` for all columns.
134+ # ' @source <https://betydb.org>
206135" managements_treatments"
207136
208137# ' Cultivar-PFT mapping from BETYdb
209138# '
210139# ' Many-to-many relationship linking cultivars to PFTs.
211140# '
212- # ' @format A data frame with columns:
213- # ' \describe{
214- # ' \item{cultivar_id}{Foreign key to cultivars}
215- # ' \item{pft_id}{Foreign key to pfts}
216- # ' }
217- # ' @source \url{https://betydb.org}
141+ # ' @format A data frame with columns cultivar_id and pft_id (plus metadata).
142+ # ' See `names(cultivars_pfts)` for all columns.
143+ # ' @source <https://betydb.org>
218144" cultivars_pfts"
0 commit comments