Skip to main content

Data aggregation

Aggregation is the transformation of multiple data values into a single resulting value using functions. Two types of aggregated values are available:

  • Absolute value: sum, average, minimum value, maximum value, and others. Usage example: calculate the total count of residents or the average rating of competitors within a polygon or a 5-minute proximity zone.
  • Specific value: ratio of two absolute values. Usage example: calculate the ratio of working population to living population.

When you aggregate data, a new layer with the Polygon visualization method is created. When you calculate the absolute value, the layer contains the aggregation attribute values calculated using the selected aggregation function for each area object. When you calculate the specific value, the layer contains the ratio of the values of two aggregation attributes. To view the resulting values in the tooltip, hover over an area object (polygon or proximity zone):

Data aggregation tooltip

Creating a layer with aggregated data

  1. Create a layer with data you want to aggregate.

    For example, if you want to aggregate data about residents, create a layer from the Population dataset.

  2. Create a layer with area objects: with the Polygon or Proximity zones visualization method.

    Both layers (with data and with area objects) must be within one dashboard scene.

  3. Go to the Dashboards tab and open the dashboard.

  4. Open a scene using the arrows Left arrow and Right arrow. If there is only one scene in the dashboard, it opens automatically.

  5. In the top menu of the dashboard, click Layers icon and select the layer with area objects.

  6. Click Aggregate data.

    Aggregate data button

  7. Specify aggregation parameters:

    • Name of the new layer: name of the new layer with aggregated data.

    • Source layer: layer with area objects.

    • Value type:

      • Absolute value: aggregates data by the selected attribute.

        Data aggregation: absolute value
      • Specific value: aggregates data by the selected attribute and divides the resulting value by the value of another attribute.

        Data aggregation: specific value
    • Data layer: data layer that contains an aggregation attribute. To calculate the specific value, you can select different layers.

    • Attribute: attribute used to aggregate data and calculate the values.

    • Aggregation: function used to calculate aggregation attribute values:

      • Sum: sum of values.
      • Average: mean value.
      • Min: minimum value.
      • Max: maximum value.
      • Median: median value that is equal to or greater than 50% of values in the group.
      • 80th percentile: value that is equal to or greater than 80% of values in the group.
      • 95th percentile: value that is equal to or greater than 95% of values in the group.
      • 99th percentile: value that is equal to or greater than 99% of values in the group.
    • Indicator name: name of the aggregation attribute displayed in the polygon tooltip and in the card when you click the polygon on the map. Changing the indicator name does not rename the attribute in the dataset.

    • Formatting: format of the aggregation attribute value displayed in the tooltip. Available formats:

      • Without formatting: thousands are separated by commas, and the fractional part is separated by a point. Example: 12345.6789 → 12,345.6789.
      • 1.2345 → 1.235: rounding to thousandths (by the rounding rule to the nearest integer). Example: 12345.6789 → 12,345.679.
      • 1.2345 → 1.23: rounding to hundredths (by the rounding rule to the nearest integer). Example: 12345.6789 → 12,345.68.
      • 1.2345 → 1.2: rounding to tenths (by the rounding rule to the nearest integer). Example: 12345.6789 → 12,345.7.
      • 1.2345 → 1: rounding to integers (by the rounding rule to the nearest integer). Example: 12345.6789 → 12,346.
      • 1,200 → 1K: compact number notation with indication of magnitude. Only for numbers from 1000. Examples: 12345 → 12K, 1234567 → 1M.
      • 1,256 → 1,260: smart rounding to tens. The integer part is rounded to tens, and the fractional part is discarded. Only for numbers from 10. Example: 12345.6789 → 12,350.
      • 1,256 → 1,300: smart rounding to hundreds. The integer part is rounded to hundreds, and the fractional part is discarded. Only for numbers from 100. Example: 12345.6789 → 12,300.
      • 1,257 → 1,000: smart rounding to thousands. The integer part is rounded to thousands, and the fractional part is discarded. Only for numbers from 1000. Example: 12345.6789 → 12,000.
      • 0.12345 → 12.345 %: converting to percentages. The maximum number of decimal places is 3. Examples: 0.12345 → 12.345%, 1 → 100%.
      • 1,200,000 → 1.2E6: scientific format (exponential notation). Examples: 12345 → 1.235E4, 1 → 1E0.
  8. To add another aggregation attribute, click Add value. You can add up to 20 attributes in a single layer.

  9. Click Create.

A new layer is created and automatically added to the selected dashboard scene. If necessary, you can configure visualization for the layer.

What's next?