Skip to contents

Derives each axis's specification from what a build under cfg would actually read, and matches it against lnk_vocabulary_read():

Usage

lnk_vocabulary_resolve(cfg, loaded = NULL)

Arguments

cfg

An lnk_config object from lnk_config().

loaded

Named list from lnk_load_overrides(). Loaded from cfg when NULL.

Value

A named character vector c(cut = , acc = , grad = , flow = ).

Details

  • cut: the break sources in the order applied (pipeline: break_order, or its default), the observation breaks (all or top_per_species, and a digest of the record rule that decides which records cut, resolved as if every species were present; only when observations is a source) and the gradient classes streams are broken at (pipeline: gradient_classes, or bcfishpass's 15 / 20 / 25 / 30 %), and which of the definite barrier, barrier control and habitat classification files the bundle declares (their rows are data, which the build record carries).

  • acc: a sha256 digest of the access rules, which decide where gradient barriers cut streams as well as what is accessible: the species the rules model, each species' access_gradient_max and observation_* lift parameters, the species presence table, which fish records make code 2 (pipeline: observation_upstream, resolved), the record rule resolved for every group in the presence table (which recorded codes count as which species, with their date floors and year limits: the pooling tracker, its species groups, the region lookup and pipeline: observation_record_date, link#470), and the access rules held elsewhere: the gradient class each access label maps to (in code) and the presence groups (lnk_presence()'s groups as the bundle's presence_groups.csv gives them, link#292). The digest is over the parsed values, so a change in quoting or column order is not a new rule set.

  • grad: how a segment's gradient is read (pipeline: gradient:): gradient=segment, the segment's own (the value when absent), or for source: parent gradient=parent;parent_cut=<cut token>, the gradient of the segment of minimal_config's network it lies in, where <cut token> is the token minimal_config resolves to. A minimal_config whose acc or flow spec differs from cfg's is refused.

  • flow: pipeline: discharge_source and pipeline: discharge_fill.

A config whose specification matches no token, or only a retired one, is refused: the new output gets a name (a row in inst/extdata/vocabulary.csv) before anything is built.

See also

Other vocabulary: lnk_vocabulary_read()

Examples

lnk_vocabulary_resolve(lnk_config("default"))
#>              cut              acc             grad             flow 
#> "cut-full-top-2"         "acc-v6"       "grad-seg"        "q-fwapg" 
lnk_vocabulary_resolve(lnk_config("bcfishpass"))
#>                  cut                  acc                 grad 
#> "cut-full-ssf-all-2"         "acc-bcfp-5"           "grad-seg" 
#>                 flow 
#>            "q-fwapg"