Search and Filter Category Values

Widget Guides

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.

  1. 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.
  2. Ensure that your Map View is zoomed to level 4, and that auto style is applied to the Railroad Companies widget.

  3. 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!

    Selected columns from a category widget

    Only the selected filters appear styled on your dashboard, and the rest of the categories are temporarily removed from your visualization.

  4. 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.

  1. Since Auto style only styles the most relevant values of your visualization, remove it and use the default styling applied to the map instead.

  2. To filter by a less relevant value, click the SEARCH IN # CATEGORIES.

    Search in other categories

  3. 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.

    Apply selected categories from OTHER widget filters

  4. 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.

    Other filters added to category widget