Histogram | Urbi Pro | 2GIS Documentation
Urbi Pro

Histogram

A histogram displays as vertical bars how often a value occurs in specified ranges, and also displays the type of distribution of values. The higher the histogram bar is, the more values ​​of the data attribute are included in the corresponding range.

Use a histogram to show the distribution of data by fixed ranges that are set using a step size.

Case example: show the distribution of working population:

Histogram showing the distribution of working population
  • The X-axis displays ranges of data values. As a grouping attribute, you can select:

    • Numeric attributes: for example, number of reviews, building area, and others.
    • Text attributes: for example, firm category, building purpose, and others. For this attribute type, a column chart with the number of objects in data groups is built instead of a histogram. You can build an extended column chart and select an aggregation attribute and function.
  • You can set a fixed range size (step size), such as 10, 20, 50, 100, or others. For example, to estimate the distribution of the average bill, use steps of 10 or 20 dollars. To estimate a distribution of age or the number of floors in buildings, use steps of 1 or 5. If you want to set up ranges of different sizes manually, use a bar or column chart.

  • By default, the histogram displays only the first 100 ranges. To see all the data, increase the range in the Step size field when creating a widget or editing it.

Example of creating a histogram
  1. Go to the Dashboards tab.

  2. Open the required dashboard.

  3. To open the scene, use the arrows Left arrow and Right arrow. If there is only one scene in a dashboard, it opens automatically when you open the dashboard.

  4. To open the list of layers, click Layers icon.

  5. Click Layer menu icon next to the required layer and select Create widget.

  6. Specify the required parameters:

    • Layer: data layer that is used to build a graph on the widget.
    • Grouping attribute: attribute that is used to group data.
    • Grouping attribute value: if you select a text grouping attribute, specify its values. You can select particular values ​​from the sample in the drop-down list or generate the top 5 or top 10 values ​​from the sample (the top values ​​are automatically calculated based on the aggregation attribute).
    • Step size: fixed size of data ranges.
  7. Set the remaining widget parameters if necessary.

  8. Click Create.

A new widget is created and automatically added to the selected dashboard scene.

Note

When working with the uploaded data, make sure that at least one attribute is specified in it to build a graph on the widget.

Parameter
Description
Widget name Widget name.
Layer Data layer that is used to build a graph on the widget.
Description Text description of the widget. You can format the text: customize headings; make the text bold, italic, or underline the text; add a link; select the text color from the palette or specify it in RGB, HSL, or HEX format.
Change widget type Click to select another widget type from the list. The configured widget parameters are saved.
Parameter
Description
Grouping attribute Attribute that is used to group data on the graph. Displayed on the X-axis.
Step size Fixed size of data ranges.
Grouping attribute value The number of vertical bars that are displayed on the graph. As values, you can select the following:
  • Any attribute values ​​from the sample in the drop-down list. You can change the order of the bars on the graph if necessary.
  • The top 5 or top 10 values ​​from the sample that are automatically calculated based on the count of objects in the group. To display the sum of the last value in the top and the remaining values ​​in the sample below this position in the last bar on the graph, select the Show other checkbox.

For text grouping attributes only (for this attribute type you can use a column chart instead of histogram).
Parameter
Description
Color Different color settings are available, depending on the type of grouping attribute (text or numeric):
  • For numeric grouping attributes: selecting a color according to which elements on the graph are colored. You can select a color from the palette or specify it in HEX format.
  • For text grouping attributes (for this attribute type you can use a column chart instead of histogram): selecting a color scale (a set of prepared color samples) according to which elements on the graph are colored.
Parameter
Description
Labels Labels of attribute values ​​on the X and Y axes.
Axes Axes on the graph.
Grid Grid on the graph.
Parameter
Description
Show legend Shows the values ​​of the grouping attribute and the corresponding count of objects in the group.
For text grouping attributes only (for this attribute type you can use a column chart instead of histogram).
Values ​​in percentage Shows the count of objects in the group as a percentage.
For text grouping attributes only (for this attribute type you can use a column chart instead of histogram).
Show source Shows the name of the data layer, the grouping attribute and the aggregation attribute with the corresponding axes, and also the aggregation type.
Show empty ranges Shows on the graph the ranges of values ​without data.
For numeric grouping attributes only.
Total value Shows the sum of the values ​​of the grouping attribute in the sample.
For numeric grouping attributes only.
Mean value Shows the mean value of the grouping attribute in the sample.
For numeric grouping attributes only.
Minimum value Shows the minimum value of the grouping attribute in the sample.
For numeric grouping attributes only.
Maximum value Shows the maximum value of the grouping attribute in the sample.
For numeric grouping attributes only.
Total objects in the asset Shows the number of objects in the sample that is used to calculate the values.