From sample's adjacency list — the same rows every consumer reads — plus the
cruise reference as the root event, plus the effort denominator from
sample_measurement:
Usage
dwc_event(
con,
dataset_key,
gear = NULL,
measurement_type = NULL,
cruises = TRUE,
close_tree = TRUE
)Arguments
- con
a DBI connection to the release
- dataset_key
the dataset
- gear
the registry from
read_gear_registry(), or NULL (nosamplingProtocol)- measurement_type
the registry from
read_measurement_type(), or NULL (sampleSizeUnitis then empty)- cruises
emit a cruise root event per
cruise_keyand parent the roots to it- close_tree
pull in an ancestor event that belongs to ANOTHER dataset, so the archive's
parentEventIDs all resolve.sample_keyis globally unique and aparent_sample_keymay point across datasets —cdfw_dungeness-crabparents 306 examined subsamples ontoswfsc_ichthyosite occupations, andcalcofi_dicparents 6 bottles ontocalcofi_bottlecasts (that is how the DIC/bottle dedup works). In the release those are not orphans; in a single-dataset archive they would be, so the ancestors travel with their owndatasetIDrather than the pointer being dropped.
Details
| Darwin Core | core |
eventID | sample.sample_key |
parentEventID | sample.parent_sample_key, or the row's cruise_key for a root |
eventType | sample.sample_type ("cruise" for a cruise event) |
eventDate | sample.datetime as ISO 8601 UTC; a cruise's date_min/date_max span |
decimalLatitude / decimalLongitude | sample.latitude / sample.longitude |
minimumDepthInMeters / maximumDepthInMeters | sample.depth_min_m / depth_max_m |
locationID | sample.site_key |
samplingProtocol | gear.csv dwc_samplingProtocol for sample.tow_type |
sampleSizeValue / sampleSizeUnit | sample_measurement volume_sampled + its registry unit |
geodeticDatum | "WGS84" — the release's own CRS |
datasetID | dataset_key |
Cruise events. A dataset's root samples carry cruise_key but no parent, so
cruises = TRUE (the default) emits one event per cruise the dataset touches and
parents the roots to it. That is a derivation from a column already on the row,
not an invention, and it is what makes an archive's events group the way a reader
expects. cruises = FALSE leaves the roots parentless.
Nothing here asserts countryCode, waterBody or coordinateUncertaintyInMeters:
the release measures none of them, and the ichthyo notebook's hand-typed values
were dataset metadata living where no provider could edit them (D-8).