Three grains, all with measurementTypeID / measurementUnitID from
measurement_type.csv's nerc_p01 / units_nerc_p06 — empty where the
registry states no exact concept, never invented:
Arguments
- con
a DBI connection to the release
- dataset_key
the dataset
- occurrence
the frame from
dwc_occurrence()— needed to resolveoccurrenceID; without it theobs_attributegrain is skipped- measurement_type
the registry from
read_measurement_type(), or NULL- env
include
obs_envrows on the dataset's own events
Details
event —
sample_measurementrows for the dataset, minusvolume_sampled(which is the event'ssampleSizeValue, not a repeat measurement).occurrence —
obs_attributerows, joined to their occurrence on(sample_key, taxon_key, life_stage). Which of a bin's two numbers is themeasurementValueis decided by the REGISTRY, not per dataset: a type with a physicalunits(body_lengthmm,carapace_lengthmm) putsbin_valueinmeasurementValueand the bin'scountinmeasurementRemarks; a type with no unit (stage,behavior) is a categorical bin, so thecountis the value and thebin_labelis the remark.event, environmental —
obs_envrows sitting on one of this dataset's own events (sample_key). Empty for a dataset that measures no environment itself.