create_observation {ecocomDP} | R Documentation |
Create the observation table
Description
Create the observation table
Usage
create_observation(
L0_flat,
observation_id,
event_id = NULL,
package_id,
location_id,
datetime,
taxon_id,
variable_name,
value,
unit = NULL
)
Arguments
L0_flat |
(tbl_df, tbl, data.frame) The fully joined source L0 dataset, in "flat" format (see details). |
observation_id |
(character) Column in |
event_id |
(character) An optional column in |
package_id |
(character) Column in |
location_id |
(character) Column in |
datetime |
(character) Column in |
taxon_id |
(character) Column in |
variable_name |
(character) Column in |
value |
(character) Column in |
unit |
(character) An optional column in |
Details
This function collects specified columns from L0_flat
and returns distinct rows.
"flat" format refers to the fully joined source L0 dataset in "wide" form with the exception of the core observation variables, which are in "long" form (i.e. using the variable_name, value, unit columns of the observation table). This "flat" format is the "widest" an L1 ecocomDP dataset can be consistently spread due to the frequent occurrence of L0 source datasets with > 1 core observation variable.
Value
(tbl_df, tbl, data.frame) The observation table.
Examples
flat <- ants_L0_flat
observation <- create_observation(
L0_flat = flat,
observation_id = "observation_id",
event_id = "event_id",
package_id = "package_id",
location_id = "location_id",
datetime = "datetime",
taxon_id = "taxon_id",
variable_name = "variable_name",
value = "value",
unit = "unit")
observation