Skip to content

Main content

Tree Cohort Source Unknown Share Tool

Calculate tree cohort source unknown share from explicit caller-supplied inputs.

Loading tool…

Description

Sum counts exactly, including those whose source ID equals unknownToken; export both totals as decimal text and their numeric share, or zero with defined=false for no trees.

Agroforestry observations combine sampled areas, cohort counts, source uncertainty and caller-supplied response assumptions. A sample expansion or conditional yield term can be computed independently of sampling representativeness or a validated tree-crop interaction. Unknown source flags must retain their reporting meaning.

Sum counts exactly, including those whose source ID equals unknownToken; export both totals as decimal text and their numeric share, or zero with defined=false for no trees.

When to use this tool

Use Tree Cohort Source Unknown Share when checking the stated cohort, sample-expansion or assumed-response convention.

How to use the tool and how it works

  1. Enter treeCounts, cohortSourceIds, unknownToken. Follow any array-alignment requirements below. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read totalTreesDecimal, unknownTreesDecimal, unknownShare, defined. Inspect defined before interpreting the associated values.

Require aligned nonnegative whole tree counts and source IDs. Sum counts exactly, including those whose source ID equals unknownToken; export both totals as decimal text and their numeric share, or zero with defined=false for no trees.1

Input fieldMeaning and unitsAccepted input
treeCountsTree CountsRequired. Array of safe integer; minimum 0; maximum items 256.
cohortSourceIdsCohort Source IdsRequired. Array of text; maximum UTF-16 length 8192; maximum items 256.
unknownTokenUnknown TokenRequired. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
totalTreesDecimalExact whole-tree total exported as decimal-integer text.Required. Text; maximum UTF-16 length 8192.
unknownTreesDecimalExact count associated with the literal unknown source token.Required. Text; maximum UTF-16 length 8192.
unknownShareUnknown ShareRequired. Finite number.
definedWhether the corresponding reporting denominator/value is defined; inspect before interpreting zero placeholders.Required. Boolean.
json
{
  "input": {
    "treeCounts": [
      2,
      3,
      5
    ],
    "cohortSourceIds": [
      "known",
      "?",
      "known"
    ],
    "unknownToken": "?"
  },
  "output": {
    "totalTreesDecimal": "10",
    "unknownTreesDecimal": "3",
    "unknownShare": 0.3,
    "defined": true
  }
}

Limitations and assumptions

  • Unknownness is literal token equality; source identity, sample representativeness and uncertainty are not verified.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.

Alternative or Complementary methods

Use representative verified samples and an appropriate complete ecological/statistical model for abundance, yield response and uncertainty.

References

  1. Calculation and input contract: agroforestry/tree-cohort-source-unknown-share — tool.io

Similar or alternative tools