Filter only variables¶
Filter only variables are variables that cannot be used as query variables. Instead they can only be used as filter variables on lower level sources to select specific categories from the query variable.
Filter only variables can only be used with microdata-based datasets.
They are specified as a list in the configuration file within the Microdata field:
"FilterOnlyVariables": ["FilterOnly1", "FilterOnly2"]
Filter only variables can share the same label as other variables. However, filter only variables must not have the same label as any source variable (either immediate or via intermediaries). All variables must have unique names.
UIs may need to take steps to handle cases where a source variable has multiple mappings with the same label.
Use case¶
Cantabular allows a single variable to have multiple independent mappings, but each mapping
must result in the same categories in the base variable being mapped to the same category in
the mapping variable. Zone might be a base variable, with Region and City Area
mapped from Zone. Both Region and City Area might be mapped to Country.
If some categories of City Area straddle national boundaries whilst all categories of
Region are contained within a single Country, then both City Area and Region
cannot be mapped to the same Country variable. Instead City Area could be mapped
to a filter only variable, with each City Area mapped to a single country. This would
allow queries involving City Area to be filtered on a national basis, whilst preventing
queries of “Country determined by by City Area mapping”.