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
- Enter observed, allowedGroups. Keep parallel arrays aligned. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- 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 field | Meaning and units | Accepted input |
|---|---|---|
| observed | Observed | Required. Array of text; maximum UTF-16 length 8192; maximum items 256. |
| allowedGroups | Allowed Groups | Required. Array of text; maximum UTF-16 length 8192; maximum items 256. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| uniqueGroups | Unique Groups | Required. Array of text; maximum UTF-16 length 8192; maximum items 256. |
| count | Count under the documented selection and duplicate convention. | Required. Safe integer. |
| unknownGroups | Unknown Groups | Required. Array of text; maximum UTF-16 length 8192; maximum items 256. |
{
"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
Similar or alternative tools
- Food Basket Energy One Commodity Share
Return commodity energy and its share of the total.
- Food Basket Inedible Weight Base
Return edible weight and multiply the nutrient coefficient by edible or gross basis according to nutrientIsEdibleBasis.