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
- Enter treeCounts, cohortSourceIds, unknownToken. Follow any array-alignment requirements below. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- 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 field | Meaning and units | Accepted input |
|---|---|---|
| treeCounts | Tree Counts | Required. Array of safe integer; minimum 0; maximum items 256. |
| cohortSourceIds | Cohort Source Ids | Required. Array of text; maximum UTF-16 length 8192; maximum items 256. |
| unknownToken | Unknown Token | Required. Text; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| totalTreesDecimal | Exact whole-tree total exported as decimal-integer text. | Required. Text; maximum UTF-16 length 8192. |
| unknownTreesDecimal | Exact count associated with the literal unknown source token. | Required. Text; maximum UTF-16 length 8192. |
| unknownShare | Unknown Share | Required. Finite number. |
| defined | Whether the corresponding reporting denominator/value is defined; inspect before interpreting zero placeholders. | Required. Boolean. |
{
"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
Similar or alternative tools
- Tree Cohort Observation Share
Return observed/eligible, or zero with defined=false when eligible is zero.
- Agroforestry Establishment Cost Tree Share Tool
Calculate agroforestry establishment cost tree share from explicit caller-supplied inputs.