Adding a choropleth layer

edit

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.

Add a vector layer from the Elastic Maps Service source

edit
  1. In the map legend, click Add layer.
  2. Click the EMS Boundaries data source.
  3. From the Layer dropdown menu, select World Countries.
  4. Click the Add layer button.
  5. Set Layer name to Total Requests by Country.
  6. Set Layer transparency to 0.5.

Join the vector layer with the sample web log index

edit

You now have a vector layer containing the world countries. To symbolize countries by web traffic, you’ll need to augment the world country features with the count of Elasticsearch weblog documents originating from each country. To do this, you’ll create a terms join to link the vector source World Countries to the Elasticsearch index kibana_sample_data_logs on the shared key iso2 = geo.src.

  1. Click plus gs plus icon to the right of Term Joins label.
  2. Click Join --select--
  3. Set Left field to ISO 3166-1 alpha-2 code.
  4. Set Right source to kibana_sample_data_logs.
  5. Set Right field to geo.src.

Set the layer style

edit

All of the world countries are still a single color because the layer is using static styling. To shade the world countries based on which country is sending the most requests, you’ll need to use data driven styling.

  1. Click gs link icon to the right of Fill color.
  2. Select the grey color ramp.
  3. In the field select input, select count of kibana_sample_data_logs:geo.src.
  4. Click Save & close.

    Your map now looks like this:

    gs add cloropeth layer