Search and Filter Category Values
This guide describes how use category widgets to filter by selected string columns from your data. Like all widgets, category widgets are data-driven. Only the most relevant categories of data are displayed, based on your Map View. As you zoom or pan the map, the category widget filters change.
When creating a category widget, you configure the widget values by an aggregated data column and define the operation of how the columns are selected. This groups data into “categories”.
Filtering Values by Category
You can select one or more values from a category widget to highlight particular columns of interest.
Import the template .carto file packaged from the “Download resources” of this guide and create the map. Builder opens with US Counties as the first map layer and Railroad Accidents as the second map layer.
Click on “Download resources” from this guide to download the zip file to your local machine. Extract the zip file to view the .carto file(s) used for this guide.
Ensure that your Map View is zoomed to level 4, and that auto style is applied to the Railroad Companies widget.
Click on the top two railroad companies, UP (Union Pacific) and BNSF (Burlington North Santa Fe).
Any time that you filter a widget connected to a layer that contains analyses, the analysis is rerun and recalculated!
Only the selected filters appear styled on your dashboard, and the rest of the categories are temporarily removed from your visualization.
Click on the same filters again to deselect them, or click ALL to show all relevant categories from the widget again.
Search for Other Values in a Category Widget
The OTHER filter (from a category widget) groups together the less relevant values that may not be visible from your Map View. You can manually search for values from the OTHER category, which can help you re-evaluate how your Map View should appear.
For example, supposed that I am doing a risk analysis of New Jersey Transit (NJTR) and Metro-North Railroad Company (MNCW) but they are not visible in my category widget. I can manually search for these values and apply them to my category widget.
Since Auto style only styles the most relevant values of your visualization, remove it and use the default styling applied to the map instead.
To filter by a less relevant value, click the SEARCH IN # CATEGORIES.
Click the box next to the other value(s) to be included. You can type a value, or search through the list of available values.
Click APPLY to filter the category widget by the selected values.
You can zoom or pan your map to the filtered location, or click UNLOCK from the Railroad Companies widget to view the default categories again.
Optionally, apply Auto style to help visualize the difference between the two railroad companies.
Category Widget Filters
The filters that appear in your widget are data-driven. Category widgets display the top five categories of data, based on the Map View of your visualization. Starting from the 6th value in the category widget, Builder applies OTHER for the remaining category values.
- You can use the Search functionality to search and filter other category values.
- Modify the order of how values appear in the category widget. As you zoom or pan the map, the category widget filters change.