suggest_workflow: Suggest a workflow to make data comply with Darwin Core...

View source: R/suggest_workflow.R

suggest_workflowR Documentation

Suggest a workflow to make data comply with Darwin Core Standard

Description

Checks whether a data.frame or tibble conforms to Darwin Core Standard and suggests how to standardise a data frame that is not standardised to minimum Darwin Core requirements. This is intended as users' go-to function for figuring out how to get started standardising their data.

Output provides a summary to users about which column names match valid Darwin Core terms, the minimum required column names/terms (and which ones are missing), and a suggested workflow to add any missing terms.

Usage

suggest_workflow(.df)

Arguments

.df

A data.frame/tibble against which checks should be run

Value

Invisibly returns the input data.frame/tibble, but primarily called for the side-effect of running check functions on that input.

Examples

df <- tibble::tibble(
  scientificName = c("Callocephalon fimbriatum", "Eolophus roseicapilla"),
  latitude = c(-35.310, "-35.273"), # deliberate error for demonstration purposes
  longitude = c(149.125, 149.133),
  eventDate = c("14-01-2023", "15-01-2023"),
  status = c("present", "present")
)

# Summarise whether your data conforms to Darwin Core Standard.
# See a suggested workflow to amend or add missing information.
df |>
  suggest_workflow()


corella documentation built on April 4, 2025, 12:20 a.m.