You work with Maps by adding layers. The data for a layer can come from sources such as {es} documents, vector sources, tile map services, web map services, and more. You can symbolize the data in different ways. For example, you might show which airports have the longest flight delays by using circles from small to big. Or, you might show the amount of web log traffic by shading countries from light to dark.
Before you start this tutorial, add the web logs sample data set. Each sample data set includes a map to go along with the data. Once you’ve added the data, open Maps and explore the different layers of the [Logs] Total Requests and Bytes map. You’ll re-create this map in this tutorial.
In this tutorial, you’ll learn to:
-
Create a multi-layer map
-
Connect a layer to a data source
-
Use symbols, colors, and labels to style a layer
-
Create layers for {es} data
The first thing to do is to create a new map.
Now that you have a map, you’ll want to add layers to it. The first layer you’ll add is a choropleth layer to shade world countries by web log traffic. Darker shades symbolize countries with more web log traffic, and lighter shades symbolize countries with less traffic.
-
In the map legend, click Add layer.
-
Click the Vector shapes data source.
-
From the Layer dropdown menu, select World Countries.
-
Click the Add layer button.
-
Set Layer name to
Total Requests by Country
. -
Set Layer transparency to 0.5.
You must add the web log traffic property to the world countries so
that the property is available for styling.
You’ll create a terms join to link the vector source World Countries to
the {es} index kibana_sample_data_logs
on the shared key iso2 = geo.src.
You’ll add two layers for {es} data. The first layer displays documents, and the second layer displays aggregated data. The raw documents appear when you zoom in the map to show smaller regions. The aggregated data appears when you zoom out the map to show larger amounts of the globe.
This layer displays web log documents as points. The layer is only visible when you zoom in the map past zoom level 9.
-
In the map legend, click Add layer.
-
Click the Documents data source.
-
Set Index pattern to kibana_sample_data_logs.
-
Click the Add layer button.
-
Set Layer name to
Actual Requests
. -
Set Min zoom to 9 and Max zoom to 24.
-
Set Layer transparency to 1.
-
Set Fill color to #2200ff.
-
Click Save & close.
Aggregations group {es} documents into grids. You can calculate metrics for each gridded cell.
You’ll create a layer for aggregated data and make it visible only when the map is zoomed out past zoom level 9. Darker colors will symbolize grids with more web log traffic, and lighter colors will symbolize grids with less traffic. Larger circles will symbolize grids with more total bytes transferred, and smaller circles will symbolize grids with less bytes transferred.
-
In the map legend, click Add layer.
-
Click the Grid aggregation data source.
-
Set Index pattern to kibana_sample_data_logs.
-
Click the Add layer button.
-
Set Layer name to
Total Requests and Bytes
. -
Set Min zoom to 0 and Max zoom to 9.
-
Set Layer transparency to 1.
Now that your map is complete, you’ll want to save it so others can use it.
-
In the application toolbar, click Save.
-
Enter
Tutorial web logs map
for the title. -
Click Confirm Save.
You’re now ready to start creating maps using your own data. You might find these resources helpful: