Kibana Tile Map

Kibana is the tool developed by the Elastic team that allows you to explore and visualize your data stored in Elasticsearch. It provides some different type of chart and in this post we are going to see how use the tile map chart.
A tile map displays a geographic area overlaid with circles keyed to the data determined by the buckets you specify.

In this post we will use the data coming from the web site bandaultralarga. It is a web site managed by the Italian government that allows to see the strategy of distribution of the broadband connection (optical fiber 30MB or 100MB) among the Italian territory during the next years and see the current situation.

I am going to use the data of the region Lombardia. You can download the data here (OpenData IODL 2.0 license).

We will build a heat map showing the current distribution of the 100MB band around the region.

For each data instance we will consider the following fields:

  • NomeProvincia: the name of the province for a given city
  • NomeRegione: the name of the region for a given city (in this example off the cities will be in the region Lombardia)
  • NomeComune: name of the city
  • oggi_100: current percentage of the city covered by 100MB band
  • geo: latitudine and longitudine of the given city

This is an example of data instance that we are going to store on Elasticsearch:

I created a new Elasticsearch index called networkcoverage and I posted a new mapping called city:

As you can see the type of the geo field is geo_point. This data type is the one used to store geo based points.
For the geo_point data type, the following formats are supported:

Lat Lon as Properties

Lat Lon as String

Format in lat,lon.

Geohash

Lat Lon as Array

Format in [lon, lat], note, the order of lon/lat here in order to conform with GeoJSON.

I represented the latitudine and longitudine as string so “41.12,-71.34” and loaded the data instances using the bulk API.

Now that the data are stored in Elasticsearch we can open the Kibana panel and under the visualize section create a new tile map.

tile map

To add a geo coordinates buckets just select the field that contains the coordinate information (in this example the geo field).
geoField

We are interested in the current 100MB band distribution, so as metric we are going to select the max of the field oggi_100.

metric

With this visualization, we can clearly see where the band distribution is high but we do not see the points where the percentage is really low (this because the dots on the map are really small).
To avoid this we need to set some chart options.

In the option tab of the chart, change the map type to Shaded geohash grid to visualize a grid instead of circle and solve the issue previously described.

grid

We built a heat map that shows the 100MB band distribution among the region Lombardia, the darker color represents the areas where the percentage of territory covered by 100MB band band is higher.

I played a bit with Kibana and I created a dashboard where is it possible to filter the map by province or city.

This is the final result:

dashbard

We can filter the map by province (in the example I selected the Bergamo province):

dashbard1

or by city (in the example I selected the city of Milano):

dashbard3