Skip to content

Main content

Household Diet Diversity Supplied Groups Count Tool

Count caller-defined distinct groups; no diet score or nutritional adequacy threshold.

Loading tool…

Description

Deduplicate observed labels, partition them by exact vocabulary membership, and count recognized groups.

Food access records may describe travel time, eligibility, household equivalents or service coverage. Each summary depends on its supplied denominator and classification; it is not a complete measure of household food security.

Deduplicate observed labels, partition them by exact vocabulary membership, and count recognized groups.

When to use this tool

Use Household Diet Diversity Supplied Groups Count when you need a transparent access, eligibility or coverage calculation.

How to use the tool and how it works

  1. Enter observed, allowedGroups. Keep parallel arrays aligned. 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 uniqueGroups, count, unknownGroups. Use the output convention below.

Require unique allowedGroups. Deduplicate observed labels, partition them by exact vocabulary membership, and count recognized groups.1

Input fieldMeaning and unitsAccepted input
observedObservedRequired. Array of text; maximum UTF-16 length 8192; maximum items 256.
allowedGroupsAllowed GroupsRequired. Array of text; maximum UTF-16 length 8192; maximum items 256.
Output fieldInterpretationReturned shape
uniqueGroupsUnique GroupsRequired. Array of text; maximum UTF-16 length 8192; maximum items 256.
countCount under the documented selection and duplicate convention.Required. Safe integer.
unknownGroupsUnknown GroupsRequired. Array of text; maximum UTF-16 length 8192; maximum items 256.
json
{
  "input": {
    "observed": [
      "grain",
      "fruit",
      "grain",
      "other"
    ],
    "allowedGroups": [
      "grain",
      "fruit",
      "veg"
    ]
  },
  "output": {
    "uniqueGroups": [
      "grain",
      "fruit"
    ],
    "count": 2,
    "unknownGroups": [
      "other"
    ]
  }
}

Limitations and assumptions

  • The vocabulary is caller supplied. This is not automatically an official dietary-diversity score or evidence of nutrient adequacy.
  • 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

Review the actual household context, service rules and source records. Combine appropriate field assessment with quantitative summaries when access, equity or nutritional needs matter.

References

  1. Calculation and input contract: food-security/household-diet-diversity-supplied-groups-count — tool.io

Similar or alternative tools