[Maps][Docs] Updates for Maps Getting Started (#32809)
* [Maps] getting started documentation * [DOCS] Edits for Maps Getting Started * [DOCS] Incorporates review comments * [DOCS] Rewrite section on sample data * [DOCS] Adds link to add sample data page
BIN
docs/maps/images/grid_metrics_both.png
Normal file
After Width: | Height: | Size: 113 KiB |
BIN
docs/maps/images/gs_add_cloropeth_layer.png
Normal file
After Width: | Height: | Size: 967 KiB |
BIN
docs/maps/images/gs_add_es_layer.png
Normal file
After Width: | Height: | Size: 809 KiB |
BIN
docs/maps/images/gs_create_new_map.png
Normal file
After Width: | Height: | Size: 731 KiB |
BIN
docs/maps/images/gs_link_icon.png
Normal file
After Width: | Height: | Size: 665 B |
BIN
docs/maps/images/gs_plus_icon.png
Normal file
After Width: | Height: | Size: 629 B |
BIN
docs/maps/images/sample_data_web_logs.png
Normal file
After Width: | Height: | Size: 698 KiB |
|
@ -13,6 +13,7 @@ image::maps/images/sample_data_ecommerce.png[]
|
|||
|
||||
--
|
||||
|
||||
include::maps-getting-started.asciidoc[]
|
||||
include::heatmap-layer.asciidoc[]
|
||||
include::tile-layer.asciidoc[]
|
||||
include::vector-layer.asciidoc[]
|
||||
|
|
171
docs/maps/maps-getting-started.asciidoc
Normal file
|
@ -0,0 +1,171 @@
|
|||
[[maps-getting-started]]
|
||||
== Getting started with Maps
|
||||
|
||||
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.
|
||||
|
||||
[role="screenshot"]
|
||||
image::maps/images/sample_data_web_logs.png[]
|
||||
|
||||
[float]
|
||||
=== Prerequisites
|
||||
Before you start this tutorial, <<add-sample-data, 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.
|
||||
|
||||
[float]
|
||||
=== Take-away skills
|
||||
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
|
||||
|
||||
|
||||
=== Creating a new map
|
||||
|
||||
The first thing to do is to create a new map.
|
||||
|
||||
. If you haven't already, open *Maps*.
|
||||
. On the maps list page, click *Create map*.
|
||||
+
|
||||
A new map is created using a base tile layer.
|
||||
+
|
||||
[role="screenshot"]
|
||||
image::maps/images/gs_create_new_map.png[]
|
||||
|
||||
|
||||
=== Adding a choropleth layer
|
||||
|
||||
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
|
||||
|
||||
. 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.
|
||||
|
||||
===== Join the vector layer with the sample web log index
|
||||
|
||||
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, terms join>> to link the vector source *World Countries* to
|
||||
the {es} index `kibana_sample_data_logs` on the shared key iso2 = geo.src.
|
||||
|
||||
. Click plus image:maps/images/gs_plus_icon.png[] to the right of *Term Joins* label.
|
||||
. Click *Join --select--*
|
||||
. Set *Left field* to *ISO 3166-1 alpha-2 code*.
|
||||
. Set *Right source* to *kibana_sample_data_logs*.
|
||||
. Set *Right field* to *geo.src*.
|
||||
|
||||
===== Set the vector style
|
||||
|
||||
The final step is to set the vector fill color to shade
|
||||
the countries by web log traffic.
|
||||
|
||||
. Click image:maps/images/gs_link_icon.png[] to the right of *Fill color*.
|
||||
. Select the grey color ramp.
|
||||
. In the field select input, select *count of kibana_sample_data_logs:geo.src*.
|
||||
. Click *Save & close*.
|
||||
+
|
||||
Your map now looks like this:
|
||||
+
|
||||
[role="screenshot"]
|
||||
image::maps/images/gs_add_cloropeth_layer.png[]
|
||||
|
||||
=== Adding layers for {es} data
|
||||
|
||||
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.
|
||||
|
||||
==== Add a vector layer from the document source
|
||||
|
||||
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*.
|
||||
|
||||
==== Add a vector layer from the grid aggregation source
|
||||
|
||||
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.
|
||||
|
||||
[role="screenshot"]
|
||||
image::maps/images/grid_metrics_both.png[]
|
||||
|
||||
===== Add the layer
|
||||
|
||||
. 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.
|
||||
|
||||
===== Configure the aggregation metrics
|
||||
|
||||
. Click plus image:maps/images/gs_plus_icon.png[] to the right of *Metrics* label.
|
||||
. Select *Sum* in the aggregation select.
|
||||
. Select *bytes* in the field select.
|
||||
|
||||
===== Set the vector style
|
||||
|
||||
. In *Vector style*, change *Symbol size*:
|
||||
.. Set *Min size* to 1.
|
||||
.. Set *Max size* to 25.
|
||||
.. In the field select, select *sum of bytes*.
|
||||
. Click *Save & close* button.
|
||||
+
|
||||
Your map now looks like this:
|
||||
+
|
||||
[role="screenshot"]
|
||||
image::maps/images/gs_add_es_layer.png[]
|
||||
|
||||
=== Saving the map
|
||||
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:
|
||||
|
||||
* <<heatmap-layer, Heat map layer>>
|
||||
* <<tile-layer, Tile layer>>
|
||||
* <<vector-layer, Vector layer>>
|
||||
|
||||
|
||||
|