Skip to contents

Create the Methods table

Usage

create_methods(L0_flat, MethodCode, MethodDescription, MethodLink = NULL)

Arguments

L0_flat

(tbl_df, tbl, data.frame) The fully joined source L0 dataset, in "flat" format (see details).

MethodCode

(character) Column in L0_flat containing the code used by the organization that collects the data to identify the Method.

MethodDescription

(character) Column in L0_flat containing the text description of each method.

MethodLink

(character) Optional. Column in L0_flat containing a link to additional reference material on the method. Should be a single valid URL.

Value

(tbl_df, tbl, data.frame) The Methods table.

Details

This function appends columns to the L0_flat table and returns the augmented table.

"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 hymetDP dataset can be consistently spread due to the frequent occurrence of L0 source datasets with > 1 core observation variable.

Examples


flat <- hymet_L0_flat

 Methods <- hymetDP::create_methods(
   L0_flat = flat,
   MethodCode = "MethodCode",
   MethodDescription = "MethodDescription")

 Methods
#> # A tibble: 1 × 3
#>   MethodCode MethodDescription                                        MethodLink
#>   <chr>      <chr>                                                    <chr>     
#> 1 1          Campbell CR10 dataloggers were used to record stream st… NA