In this chapter, we will continue improving our Spotfire skills. We will focus on activities such as data filtering, data manipulation, and library creation.
We will also focus on analysis visualization and interaction, resorting to Spotfire Web Player Server — the reader will become familiarized with the tool's main features. We will focus a bit on this product, as it is a great tool to share analysis with others.
The function of filters is to restrict the data shown in visualizations. This means that the users can limit the records of the visualization's data table that are displayed or used in the visualization itself. The filtering out of data has an impact on visualization aggregations and axis scales, and its application is immediate, as any selection/deselection will be rendered without any delays.
By default, a filter is created by Spotfire for each column of each existing data table, and all filters are available in a panel named Filters, that is presented on the top-right corner of the Spotfire Professional display.
Filters are grouped by data table, and these tables will be sorted chronologically by ascending creation date. Focus will be on the first data table that is used in a visualization of the current page.
The following screenshot is an example of the Filters panel for the visualization of the page Store Sales - Total Sales – StoreSales data table.
This panel also has a search field to allow a quicker finding of filters by their name.
Filter names not matching with the search keyword will be hidden from the user and cannot be applied. To display all filters again, the user must remove all the keywords from the search box.
The following screenshot displays a filter search for the keyword gender.
Two distinct filters were found which match the keyword: one from the data table StoreSales and the other from the data table Performance.
The Filters panel can be moved, closed, and opened. To open and close the panel, users can navigate to the View | Filters menu, or the Filters button on the toolbar. Both the enumerated options are presented in the following two screenshots respectively:
Just as the data columns have an underlying data type, filters also make available several interaction types to improve and facilitate usage. Spotfire offers the following filter types:
integer
or date(time)
. The label values above the slider (that represent the interval limits) can be double-clicked and set manually (for date formats, users can simply click on the calendar icon and choose the date from the pop up). The following screenshot presents an example of such a filter type:*
can also be used. The following screenshot presents an example of such a filter type:This filtering will filter out the records with Business locations other than Boston and Los Angeles, as only these two match with the expression *os*
(only these two contain os
somewhere in their value).
By right-clicking on a filter, the user is presented with a filter options menu, which allows manipulation of filters.
The following options are available:
Spotfire places a lot of emphasis on its data filtering capabilities.
For increased flexibility, users can create their own schemes, where filters can be applied independently of other schemes.
All schemes will always contain all available filters. It is the application of filters that is independent between the schemes. The following two screenshots demonstrate this independent behavior; although the scheme Filtering scheme 1 has values 10, 20, 30, and 40 filtered out from the filter Age group (of the data table StoreSales ), the scheme Filtering scheme 2 has all the values included.
Any change between schemes has an immediate impact on the displayed visualizations.
To illustrate the application of filters, we will now see the difference between two visualizations with and without filters. The following two screenshots will demonstrate this.
The first screenshot contains the visualizations of the page Store Sales - Total Sales without any filtering:
The following screenshot presents the same visualizations with the following filters applied:
It is curious to realize that the correlation between the variables Total and Number of purchases increases with the application of these filters. With the filtered out data, the direct correlation is of 83 percent.
Hierarchies are a special type of filter, where the filter itself is displayed in a hierarchical format. Conceptually, these filters behave as data trees.
An example of a hierarchy is the definition of a Calendar, divided into years, quarters, months, weeks, and days.
The simplest way to demonstrate this Spotfire feature is to create Date Hierarchy Filter from a Date Range filter type. We will use the Date joined filter from the StoreSales data table.
Right-clicking on the Date joined filter, and then selecting the Insert Hierarchy option, will present a dialog box as shown in the following screenshot:
The default selected columns for hierarchy creation are Year, Month, and Day of Month. The remaining selectable columns are Quarter, Week, Day of Year, and Day of Week. We can add the Quarter column and move it up between Year and Month. The hierarchy configuration will look similar to the following screenshot:
The addition of a column can be done by selecting the column and clicking on Add, and shifting of the column through the hierarchy can be done using the buttons Move Up and Move Down.
Hierarchies also have a name, which can be set during the creation process (in the dialog box) or changed later (by right-clicking on top of the hierarchy).
The created hierarchical filter does not replace the original one. Both will coexist in the analysis. In our example, both the Date joined filter and the hierarchy named Date Joined Hierarchy will be shown to the user.
The following screenshot presents the created hierarchy:
Hierarchies can also be created using two or more data table columns. The only existing limitation is related to the fact that only one data table can be used in one hierarchy.
As already specified, graph elements (displayed data) can be selected, and this is called marking. This action has several purposes, such as updating the details visualization (in the Details-on-Demand panel), copying records, and so on.
The user has a varied set of options available for marking: click on the item, Ctrl + click on the item, Shift + click, Ctrl + Shift + click, Alt + click, and so on. A complete list with detailed descriptions can be found in the Spotfire Professional's Help Topics documentation page, Marking in Visualizations.
To unmark a selection, users must right-click on the top of the visualization and select Marked Rows | Unmark. Other options will also be offered to the user such as Invert, Delete, Filter To, and Filter Out. The following screenshot lists these options:
The data table records of marked data will be listed in the Details-on-Demand panel of Spotfire Professional. This panel is located by default on the right lower corner of the screen, just below the Filters panel. And just like the filters, it can be moved, closed, and opened. To open and close the panel, navigate to the View | Details-on-Demand menu, or the Details-on-Demand button on the toolbar.
This panel can be customized, by using its Properties dialog box (obtained by right-clicking on the window):