Skip to content

Main content

Crop Functional Group Share Tool

Calculate crop functional group share from explicit caller-supplied inputs.

Loading tool…

Description

Sum weights whose label matches requestedGroup and divide by all weights; zero total returns share=0, defined=false.

Ecological observation summaries depend on sampling effort, eligible time, classified counts and missingness policies. Flower-minutes, area-days and observed proportions have different denominators. Observation support is distinct from true abundance, detection probability or a causal biological-control effect.

Sum weights whose label matches requestedGroup and divide by all weights; zero total returns share=0, defined=false.

When to use this tool

Use Crop Functional Group Share when checking the stated observation support, exposure, sample or seasonal-gap convention.

How to use the tool and how it works

  1. Enter cropGroups, cropWeights, requestedGroup. 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 groupWeight, share, defined. Inspect defined before interpreting the associated values.

Require aligned crop-group labels and nonnegative weights. Sum weights whose label matches requestedGroup and divide by all weights; zero total returns share=0, defined=false.1

Input fieldMeaning and unitsAccepted input
cropGroupsCrop GroupsRequired. Array of text; maximum UTF-16 length 8192; maximum items 256.
cropWeightsCrop WeightsRequired. Array of finite number; minimum 0; maximum items 256.
requestedGroupRequested GroupRequired. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
groupWeightGroup WeightRequired. Finite number.
shareDimensionless share using the operation-specific denominator stated above; not a percentage number.Required. Finite number.
definedWhether the corresponding reporting denominator/value is defined; inspect before interpreting zero placeholders.Required. Boolean.
json
{
  "input": {
    "cropGroups": [
      "legume",
      "cereal",
      "legume"
    ],
    "cropWeights": [
      2,
      6,
      2
    ],
    "requestedGroup": "legume"
  },
  "output": {
    "groupWeight": 4,
    "share": 0.4,
    "defined": true
  }
}

Limitations and assumptions

  • Weights may represent area or another explicit common basis; labels are literal and not a functional-trait classification.
  • 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.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Use verified representative field records and suitable sampling/detection analysis for ecological inference, uncertainty and management.

References

  1. Calculation and input contract: agroecology/crop-functional-group-share — tool.io

Similar or alternative tools