Next: , Previous: , Up: SPV Light Detail Member Format   [Contents][Index]

D.2.11 Categories

Categories are arranged in a tree. Only the leaf nodes in the tree are really categories; the others just serve as grouping constructs.

Category ⇒ Value[name] (Leaf | Group)
Leaf ⇒ 00 00 00 i2 int[cat-index] i0
Group ⇒
    bool[merge] 00 01 (i0 | i2)[data]
    i-1 int[n-subcategories] Category*[n-subcategories]

name is the name of the category (or group).

A Leaf represents a leaf category. The Leaf’s cat-index is a nonnegative integer less than n-categories in the Dimension in which the Category is nested (directly or indirectly). These categories represent the original order in which the categories were sorted; if the user sorted or rearranged the categories, then the order of categories in the file reflects that without changing the cat-index values.

A Group is a group of nested categories. Usually a Group contains at least one Category, so that n-subcategories is positive, but a few Groups with n-subcategories 0 has been observed.

If a Group’s merge is 00, the most common value, then the group is really a distinct group that should be represented as such in the visual representation and user interface. If merge is 01, the categories in this group should be shown and treated as if they were direct children of the group’s containing group (or if it has no parent group, then direct children of the dimension), and this group’s name is irrelevant and should not be displayed. (Merged groups can be nested!)

A Group’s data appears to be i2 when all of the categories within a group are leaf categories that directly represent data values for a variable (e.g. in a frequency table or crosstabulation, a group of values in a variable being tabulated) and i0 otherwise.

Next: , Previous: , Up: SPV Light Detail Member Format   [Contents][Index]