set_events | R Documentation |
Identify or format columns that contain information about an Event. An "Event" in Darwin Core Standard refers to an action that occurs at a place and time. Examples include:
A specimen collecting event
A survey or sampling event
A camera trap image capture
A marine trawl
A camera trap deployment event
A camera trap burst image event (with many images for one observation)
In practice this function is used no differently from mutate()
, but gives
users some informative errors, and serves as a useful lookup for fields in
the Darwin Core Standard.
set_events(
.df,
eventID = NULL,
eventType = NULL,
parentEventID = NULL,
.keep = "unused",
.keep_composite = "all"
)
.df |
A |
eventID |
A unique identifier for an individual Event. |
eventType |
The type of Event |
parentEventID |
The parent event under which one or more Events sit within. |
.keep |
Control which columns from |
.keep_composite |
Control which columns from |
Each Event requires a unique eventID
and eventType
(because there can
be several types of Events in a single dataset), along with a
parentEventID
which specifies the level under which the current Event sits
(e.g., An individual location's survey event ID, which is one of several
survey locations on a specific day's set of surveys ie the parentEvent).
Examples of eventID
values:
INBO:VIS:Ev:00009375
Examples of eventType
values:
Sample
Observation
Survey
Site Visit
Deployment
See more examples on dwc.tdwg.org
Examples of parentEventID
A1
(To identify the parent event in nested samples, each with their own eventID
- A1_1
, A1_2
)
A tibble
with the requested fields added/reformatted.
# example Event dataframe
df <- tibble::tibble(
site_code = c("AMA100", "AMA100", "AMH100"),
scientificName = c("Crinia signifera", "Crinia signifera", "Crinia signifera"),
latitude = c(-35.275, -35.274, -35.101),
longitue = c(149.001, 149.004, 149.274),
)
# Add event information
df |>
set_events(
eventID = composite_id(sequential_id(),
site_code,
year),
eventType = "Survey"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.