Creating a Hierarchy Filter
If hierarchies exist in your knowledge graph, you can create a Hierarchy Filter to explore the parent and child relationships and filter the Dashboard based on the relationships. Unlike the majority of Dashboard filters, where you select a a property to filter on, Hierarchy Filters operate on relationships and are only available as a filter type when you select a path to filter on.
In order to produce hierarchies in the data, you typically need a self-referential data model, where properties have relationships to themselves. The SKOS ontology is a good example of a self-referential model. As shown in the image below, many of the properties in the Concept class refer to themselves. These paths define a hierarchy.
Follow the instructions below to create a Hierarchy Filter.
- Open the Dashboard that you want to add the filter to.
- In the Hi-Res Analytics main toolbar, click Filters and select Create a Filter. The Create Filter dialog box is displayed.
- Click in the Fields field to open the Property drop-down list and determine the path to filter on. The list of available classes, paths, and properties depends on the selected Data Type for the Dashboard.
For example, the following image shows the list of properties that are available for a Dashboard whose source is a Graphmart that contains data about protein classification. The Data Type for the Dashboard is Classification:
The list below describes the icons and options that are available when choosing a path:
- The Root Value () is the instance URI for the root resource—the URI for the instances of the class that was chosen as the Data Type for the Dashboard. Typically Root Value is the chosen Field for Hierarchy Filters.
To view the Root Value values, you can use the STR function to show a string representation of the URIs.
- Linked classes are represented by incoming () and outgoing () connection icons. The properties in those classes with a path to another class are denoted with a circle icon (). Selecting a linked property navigates to that class and displays its properties.
- When a property or path is selected, the breadcrumbs at the top of the dialog box show you the property path. You can click the Clear icon () to clear the path and start again.
- After you have selected a path, you can apply a function or formula to calculate the values that are displayed in the filter. To add a function, click the function button (fx) at the top of the drop-down list. The functions that become available depend on the data type of the selected path. To choose a more advanced function or type a formula, click Advanced. The Calculated Value dialog box opens and enables you to choose additional properties and functions. For more information, see Calculating Values in Lenses and Filters.
- The Root Value () is the instance URI for the root resource—the URI for the instances of the class that was chosen as the Data Type for the Dashboard. Typically Root Value is the chosen Field for Hierarchy Filters.
- After you have selected the path to filter on, click Close to close the Fields drop-down list.
- Next, click the Filter field and select Hierarchy from the drop-down list. The dialog box is refreshed to show the Filter Properties and other options that are available for the filter type:
- Configure any of the following properties. Label Field and Children Field are required fields, and the rest of the fields are optional:
- Title: Defines the title that appears at the top of the filter when it is added to the Dashboard. If Title is blank, the value from the Fields field is used as the title.
- Show Counts: This setting controls whether the number of results for each filter value are displayed in parentheses next to the value.
- Respond to Other Filters: This setting controls whether the results of this filter change based on selections in other filters on the Dashboard.
- Label Field: Species the property that supplies the label for the parent values in the hierarchy.
- Children Field: Specifies the child value in the relationship.
- If you would like to be able to further constrain the data that appears in the filter, you can add one or more subfilters. To add a subfilter, click Create Filter under Subfilters. The process of creating a subfilter is the same as the process for the parent filter. However, the subfilter is not displayed on the Dashboard. It is visible only when editing the parent filter, and the subfilter's configuration affects only the parent filter and any sibling subfilters.
- When you have finished configuring the filter, click OK to add it to the Dashboard. The new filter appears in the left pane of the Dashboard and displays the values that are available for filtering the displayed data.
For example, the filter in the image below shows a hierarchy of classifications.
Selecting checkboxes in the filter refreshes the Dashboard to show only the data that includes the selected values.
When working with the filter on the Dashboard, the following options are available:
- Clear (): This option is available when one or more results are selected. Clicking Clear removes all selections.
- Designer (): Clicking this icon opens the filter Designer so that you can view or change the filter configuration.
- Close (X): Clicking Close removes the filter from the Dashboard. This action cannot be undone.