You can use many of Contour's visualization boards to filter as well as visualize data. This document explores how to use the histogram, filter, and chart boards to do so. Advanced users may want to look at Contour’s expression language for more powerful filtering options. The screenshots on this page use open source aviation data from the Foundry Reference Project.
The histogram is one of the simplest ways to filter, and is recommended for visually exploring an unfamiliar dataset.
After creating a histogram, simply click on the bars to filter on them:
After selecting bars in the histogram, the bottom of the histogram will say Keep rows where column_name
is value
. This tells you that your working dataset has been filtered down to just the rows that have that value in that particular column. (You can use the dropdown selector to change Keep to Remove if you want to keep only rows that do not have that value.)
You can use multiple histograms in sequence to perform more complex filtering:
The filter board works best when you already know what you’re looking for. The filter board is very flexible and lets you input exactly what you want to filter.
Add a filter board by choosing Filter from the action ribbon:
Click Add filter and select the name of the column on which you want to filter (you can start typing the column name to find it more quickly). Enter the values you want to filter to and add each value with the Enter key. Then click Save when you’re finished adding filters.
Use Keep if you want to filter down to only data that meet the set criteria, as shown below:
Use Remove if you want to exclude only data that meet the set criteria, as shown below:
The above examples simply check whether a column value contains a word or phrase. However, there are many other comparisons available. Click where it says contains to see the full list, divided by category (click the heading names to change categories)
If you choose a column of a particular type (like a date or a number), Contour will automatically select the appropriate category for you:
When someone creates a new analysis for a specific filter (e.g. carrier_code = DL
), other people can easily replicate their analysis by changing the filter to their use case (e.g. carrier_code = UA
) or removing the filter all-together to perform a global analysis.
In Foundry, analytical operations are applied to an entire column by default, in order to facilitate analysis of large datasets. If you would like to run an analysis on a smaller selection of rows (similar to selecting a specific cell range in Excel), filter the data down to the desired rows before applying the operations.
You can filter data on the chart by clicking on the chart area you'd like to filter; hold Ctrl on Windows or Cmd on macOS and click to select multiple segments. This will filter your working dataset down to your selection (similar to the behavior of histograms).
Hover the mouse cursor over a piece of data to see a key with the exact figure: