2016-10-25 03:41:32 +02:00
[[tutorial-visualizing]]
2019-07-25 22:46:23 +02:00
=== Visualize your data
2016-10-25 03:41:32 +02:00
2020-09-03 23:34:25 +02:00
Shape your data using a variety
of {kib} supported visualizations, tables, and more. In this tutorial, you'll create four
visualizations that you'll use to create a dashboard.
2016-10-25 03:41:32 +02:00
2020-09-03 23:34:25 +02:00
To begin, open the menu, go to *Dashboard*, then click *Create new dashboard*.
2019-07-25 22:46:23 +02:00
[float]
2020-09-03 23:34:25 +02:00
[[compare-the-number-of-speaking-parts-in-the-play]]
=== Compare the number of speaking parts in the plays
2019-07-25 22:46:23 +02:00
2020-09-03 23:34:25 +02:00
To visualize the Shakespeare data and compare the number of speaking parts in the plays, create a bar chart using *Lens*.
2019-07-25 22:46:23 +02:00
2020-09-03 23:34:25 +02:00
. Click *Create new*, then click *Lens* on the *New Visualization* window.
2018-05-14 22:54:23 +02:00
+
[role="screenshot"]
2020-09-28 17:41:03 +02:00
image::images/tutorial-visualize-wizard-step-1.png[Image showing different options for your new visualization]
2017-04-17 18:35:33 +02:00
2020-09-03 23:34:25 +02:00
. Make sure the index pattern is *shakes*.
. Display the play data along the x-axis.
.. From the *Available fields* list, drag and drop *play_name* to the *X-axis* field.
.. Click *Top values of play_name*.
.. From the *Order direction* dropdown, select *Ascending*.
.. In the *Label* field, enter `Play Name`.
. Display the number of speaking parts per play along the y-axis.
.. From the *Available fields* list, drag and drop *speaker* to the *Y-axis* field.
.. Click *Unique count of speaker*.
.. In the *Label* field, enter `Speaking Parts`.
+
[role="screenshot"]
2020-09-28 17:41:03 +02:00
image::images/tutorial-visualize-bar-1.5.png[Bar chart showing the speaking parts data]
2020-09-03 23:34:25 +02:00
. *Save* the chart with the name `Bar Example`.
2018-05-14 22:54:23 +02:00
+
2020-09-03 23:34:25 +02:00
To show a tooltip with the number of speaking parts for that play, hover over a bar.
2019-07-25 22:46:23 +02:00
+
2020-09-03 23:34:25 +02:00
Notice how the individual play names show up as whole phrases, instead of
broken up into individual words. This is the result of the mapping
you did at the beginning of the tutorial, when you marked the `play_name` field
as `not analyzed`.
2016-10-26 05:44:55 +02:00
2020-09-03 23:34:25 +02:00
[float]
[[view-the-average-account-balance-by-age]]
=== View the average account balance by age
To gain insight into the account balances in the bank account data, create a pie chart. In this tutorial, you'll use the {es}
{ref}/search-aggregations.html[bucket aggregation] to specify the pie slices to display. The bucket aggregation sorts the documents that match your search criteria into different
categories and establishes multiple ranges of account balances so that you can find how many accounts fall into each range.
. Click *Create new*, then click *Pie* on the *New Visualization* window.
. On the *Choose a source* window, select `ba*`.
2019-07-25 22:46:23 +02:00
+
2020-09-03 23:34:25 +02:00
Since the default search matches all documents, the pie contains a single slice.
. In the *Buckets* pane, click *Add > Split slices.*
2020-06-12 16:39:36 +02:00
.. From the *Aggregation* dropdown, select *Range*.
2020-09-03 23:34:25 +02:00
2020-06-12 16:39:36 +02:00
.. From the *Field* dropdown, select *balance*.
2020-09-03 23:34:25 +02:00
.. Click *Add range* until there are six rows of fields, then define the following ranges:
2016-10-26 05:44:55 +02:00
+
2016-10-25 03:41:32 +02:00
[source,text]
0 999
1000 2999
3000 6999
7000 14999
15000 30999
31000 50000
2020-06-12 16:39:36 +02:00
. Click *Update*.
2019-07-25 22:46:23 +02:00
+
2020-09-03 23:34:25 +02:00
The pie chart displays the proportion of the 1,000 accounts that fall into each of the ranges.
2019-07-25 22:46:23 +02:00
+
2018-05-14 22:54:23 +02:00
[role="screenshot"]
2020-09-28 17:41:03 +02:00
image::images/tutorial-visualize-pie-2.png[Pie chart displaying accounts that fall into each of the ranges, scaled to 1000 accounts]
2016-10-25 03:41:32 +02:00
2020-09-03 23:34:25 +02:00
. Add another bucket aggregation that displays the ages of the account holders.
2016-10-25 03:41:32 +02:00
2020-06-12 16:39:36 +02:00
.. In the *Buckets* pane, click *Add*, then click *Split slices*.
2020-09-03 23:34:25 +02:00
2020-06-12 16:39:36 +02:00
.. From the *Sub aggregation* dropdown, select *Terms*.
2016-10-26 05:44:55 +02:00
2020-09-03 23:34:25 +02:00
.. From the *Field* dropdown, select *age*, then click *Update*.
2019-07-25 22:46:23 +02:00
+
2020-06-12 16:39:36 +02:00
The break down of the ages of the account holders are displayed
2016-10-26 05:44:55 +02:00
in a ring around the balance ranges.
2019-07-25 22:46:23 +02:00
+
2018-05-14 22:54:23 +02:00
[role="screenshot"]
2020-09-28 17:41:03 +02:00
image::images/tutorial-visualize-pie-3.png[Final pie chart showing all of the changes]
2016-10-25 03:41:32 +02:00
2020-06-12 16:39:36 +02:00
. Click *Save*, then enter `Pie Example` in the *Title* field.
2018-08-16 14:52:38 +02:00
2019-07-25 22:46:23 +02:00
[float]
2020-09-03 23:34:25 +02:00
[role="xpack"]
[[visualize-geographic-information]]
=== Visualize geographic information
2016-10-25 03:41:32 +02:00
2020-09-03 23:34:25 +02:00
To visualize geographic information in the log file data, use <<maps,Maps>>.
2018-05-14 22:54:23 +02:00
2020-09-03 23:34:25 +02:00
. Click *Create new*, then click *Maps* on the *New Visualization* window.
. To change the time, use the time filter.
.. Set the *Start date* to `May 18, 2015 @ 12:00:00.000`.
.. Set the *End date* to `May 20, 2015 @ 12:00:00.000`.
2019-07-25 22:46:23 +02:00
+
2020-09-03 23:34:25 +02:00
[role="screenshot"]
2020-09-28 17:41:03 +02:00
image::images/gs_maps_time_filter.png[Image showing the time filter for Maps tutorial]
2018-05-14 22:54:23 +02:00
2020-09-03 23:34:25 +02:00
.. Click *Update*
. Map the geo coordinates from the log files.
2016-10-25 03:41:32 +02:00
2020-09-03 23:34:25 +02:00
.. Click *Add layer > Clusters and grids*.
2018-05-14 22:54:23 +02:00
2020-09-03 23:34:25 +02:00
.. From the *Index pattern* dropdown, select *logstash*.
2016-10-25 03:41:32 +02:00
2020-09-03 23:34:25 +02:00
.. Click *Add layer*.
2016-10-26 05:44:55 +02:00
2020-09-03 23:34:25 +02:00
. Specify the *Layer Style*.
2016-10-25 03:41:32 +02:00
2020-09-03 23:34:25 +02:00
.. From the *Fill color* dropdown, select the yellow to red color ramp.
.. In the *Border width* field, enter `3`.
.. From the *Border color* dropdown, select *#FFF*, then click *Save & close*.
2019-07-25 22:46:23 +02:00
+
[role="screenshot"]
2020-09-28 17:41:03 +02:00
image::images/tutorial-visualize-map-2.png[Example of a map visualization]
2020-09-03 23:34:25 +02:00
. Click *Save*, then enter `Map Example` in the *Title* field.
. Add the map to your dashboard.
.. Open the menu, go to *Dashboard*, then click *Add*.
.. On the *Add panels* flyout, click *Map Example*.
2018-05-14 22:54:23 +02:00
2019-07-25 22:46:23 +02:00
[float]
2019-11-11 23:34:45 +01:00
[[tutorial-visualize-markdown]]
2020-09-03 23:34:25 +02:00
=== Add context to your visualizations with Markdown
2016-10-25 03:41:32 +02:00
2020-09-03 23:34:25 +02:00
Add context to your new visualizations with Markdown text.
2019-11-11 23:34:45 +01:00
2020-09-03 23:34:25 +02:00
. Click *Create new*, then click *Markdown* on the *New Visualization* window.
. In the *Markdown* text field, enter:
2019-11-11 23:34:45 +01:00
+
[source,markdown]
# This is a tutorial dashboard!
The Markdown widget uses **markdown** syntax.
> Blockquotes in Markdown use the > character.
2016-10-25 03:41:32 +02:00
2020-06-12 16:39:36 +02:00
. Click *Update*.
2019-07-25 22:46:23 +02:00
+
2019-11-11 23:34:45 +01:00
The Markdown renders in the preview pane.
+
[role="screenshot"]
2020-09-28 17:41:03 +02:00
image::images/tutorial-visualize-md-2.png[Image showing example markdown editing field]
2019-11-11 23:34:45 +01:00
2020-09-03 23:34:25 +02:00
. Click *Save*, then enter `Markdown Example` in the *Title* field.
2019-11-11 23:34:45 +01:00
2020-09-03 23:34:25 +02:00
[role="screenshot"]
2020-09-28 17:41:03 +02:00
image::images/tutorial-dashboard.png[Final visualization with bar chart, pie chart, map, and markdown text field]
2019-11-11 23:34:45 +01:00
2020-09-03 23:34:25 +02:00
[float]
=== Next steps
2019-11-11 23:34:45 +01:00
2020-09-03 23:34:25 +02:00
Now that you have the basics, you're ready to start exploring your own system data with {kib}.
2016-10-25 03:41:32 +02:00
2020-09-03 23:34:25 +02:00
* To add your own data to {kib}, refer to <<connect-to-elasticsearch,Add data to {kib}>>.
2016-10-25 03:41:32 +02:00
2020-09-03 23:34:25 +02:00
* To search and filter your data, refer to {kibana-ref}/discover.html[Discover].
2018-05-14 22:54:23 +02:00
2020-09-03 23:34:25 +02:00
* To create a dashboard with your own data, refer to <<dashboard, Dashboard>>.
2018-05-14 22:54:23 +02:00
2020-09-03 23:34:25 +02:00
* To create maps that you can add to your dashboards, refer to <<maps,Maps>>.
2016-10-25 03:41:32 +02:00
2020-09-03 23:34:25 +02:00
* To create presentations of your live data, refer to <<canvas,Canvas>>.