English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Elasticsearch Heatmap

A heatmap is a type of visualization where different color shades represent different areas in the graph. The value can change continuously, so the color shades change with the value. They are very useful for representing both continuous and discrete data.

In this chapter, we will use the dataset named sample_data_flights to build a heatmap. In it, we consider the variables of the departure country and destination country of the flight and count them.

In the Kibana main screen, we find the option name Visualize, which allows us to create visualizations and aggregations from the indexes stored in Elasticsearch. We select to add a new visualization and then choose 'Heatmap' as the option shown below.

Select Index

The next screen prompts us to select the index that will be used when creating the heatmap chart. Here, we select count as the type of aggregation metric. Then, for the buckets on the Y-axis, we select "terms" as the summary for the OriginCountry field. For the X-axis, we select the same aggregation as the field to be used for DestCountry. In both cases, we choose the size of the buckets to be5.

After running the configuration displayed above, we get the heatmap chart as shown below.

Note −The date range must be set to "This Year" so that the graph can collect one year of data to generate an effective heatmap.