occurrence_terms | R Documentation |
When creating a Darwin Core archive, it is often useful to select only those
fields that conform to the standard. These functions provide a vector of
terms that can be used in combination with dplyr::select()
and
dplyr::any_of()
to quickly select Darwin Core terms for the relevant
data type (events, occurrences, media).
occurrence_terms()
event_terms()
A vector of accepted (but not mandatory) values for that use case.
basisOfRecord_values()
or countryCode_values()
for valid entries
within a field.
# Return a vector of accepted terms in an Occurrence-based dataset
occurrence_terms() |> head(10L) # first 10 terms
# Use this vector to filter a data frame
df <- tibble::tibble(
name = c("Crinia Signifera", "Crinia Signifera", "Litoria peronii"),
latitude = c(-35.27, -35.24, -35.83),
longitude = c(149.33, 149.34, 149.34),
eventDate = c("2010-10-14", "2010-10-14", "2010-10-14"),
measurement1 = c(24.3, 24.9, 20.1), # example measurement column
measurement2 = c(0.92, 1.03, 1.09) # example measurement column
)
df |>
dplyr::select(any_of(occurrence_terms()))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.