Skip to content

Advanced settings

Clément Prod'homme edited this page Feb 15, 2021 · 1 revision

In this section, we'll dive deeper into settings that are a bit more complex than the ones that are oftenly used to create visualizations.

All these settings only apply to charts, not maps.

Table of content

Aggregating values

Depending on the type of data you manipulate with the widget-editor, it may be possible that you want to display aggregated values. For example, if you were to get a list of power plants for the entire world, you may be interested in creating a bar chart that displays the number of power plants by country. In that case, you would aggregate the plants by country, and count them.

The widget-editor has a very simple setting to do so: the “Value aggregation” dropdown located in the “Description and labels” accordion of the “General” tab.

Five types of aggregation are available:

  • Sum
  • Average
  • Minimum
  • Maximum
  • Count

When you select one of them, the widget-editor is intelligent enough to know which criterion to use to aggregate the data.

Ordering values

By default, most of the charts are sorted from the biggest values to the smallest. What if you would like the reverse? What if you would like less/more values to be displayed?

The widget-editor provides these settings in the “Order” accordion located at the bottom of the “General” tab. There, you can select which column to sort with, in which direction (ascending or descending), and you can select the number of rows to use as well.

Please note that by limiting the number of rows with the “Limit” field, you may distort a chart by only including a fraction of the data you actually need. This is especially true if you combine this setting with an aggregation. In case of doubt, have a look at the “Table view” (last tab).

Filtering data

In the widget-editor, there are several ways to filter data. In most of the cases, you would want to use the general filters, and sometimes the geographic one. In rare instances, the end-user filters may be what you're looking for.

General filters

These filters are the ones located in the “Filters” accordion of the “General” tab.

To add a filter, you are asked to select a column of the dataset first, and then to select an operation, such as “Greater than”. The last step is to actually assign a value to that filter.

For example, if you had a dataset with the list of all the power plants in the world, and you would like to create a chart with the plants of France only, here's what you would do:

  1. Select the column that contains the name of the country (associated with each plant)
  2. Select the operation “Select by values”
  3. Select the option “France”

Depending on the type of your column (if it contains strings, numbers or dates), the operations change. For example, for numbers, you can select a “Greater than” operation, but for string, you can use “Text starts with”.

The widget-editor lets you add as many filters as you wish.

Geographic filter

The geographic filter is located in the accordion of the same name in the “General” tab. Contrary to the general filters, you can only add one geographic filter at a time.

This option may not always be available. There are two reasons for that: the dataset doesn't have geographic information or the app that hosts the widget-editor has disabled this filter.

If it is available, you can use it to retrieve the rows of the dataset that are relevant for a specific area in the world.

The filter is quite simple: you select an area from a predefined list (and/or your own custom areas if available), and the data is automatically filtered.

End-user filters

These filters are quite special because they do not work as the other two types. Instead of being only present in the widget-editor, they also live by the widget.

Concretely, this means that the filters are displayed below the chart and that when the widget is displayed somewhere else, the (end-)user will be able to dynamically update the visualization by updating their value. Don't worry, the changes done by the end-user are not saved!

As with the general filters, you are able to add multiple end-user filter per chart. Here you only select the columns of the dataset you're interested in, and the filters appear below the chart.

Please note that the options available for each filter are computed when the chart is created/updated. So if the dataset changes, the options of the filters won't.

Some of those options or combination of options may also lead to a chart without any data. In this case, the area where the chart usually is will be blank.

Finally, as with the geographic filter, the app that hosts the widget-editor may disable this option.