kibana/docs/getting-started/tutorial-visualizing.asciidoc
Kaarina Tungseth c84532aade
[DOCS] Dashboard-first docs refresh (#76194)
* [DOCS] Dashboard-first refresh

* Fixes broken links and partinto error

* Fixes images in panel table

* Fixes broken links

* Fixes broken drilldowns link

* Fixes images and table

* Removed un needed files and added edit content

* Update docs/getting-started/tutorial-visualizing.asciidoc

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Review comments

* Review comments

* Removed blocks

* Typo fix

* Update docs/getting-started/tutorial-sample-data.asciidoc

Co-authored-by: Wylie Conlon <wylieconlon@gmail.com>

* Update docs/getting-started/tutorial-discovering.asciidoc

Co-authored-by: Wylie Conlon <wylieconlon@gmail.com>

* Update docs/getting-started/tutorial-sample-data.asciidoc

Co-authored-by: Wylie Conlon <wylieconlon@gmail.com>

* Update docs/getting-started/tutorial-visualizing.asciidoc

Co-authored-by: Wylie Conlon <wylieconlon@gmail.com>

* Update docs/user/dashboard/edit-dashboards.asciidoc

Co-authored-by: Wylie Conlon <wylieconlon@gmail.com>

* Update docs/user/dashboard/dashboard.asciidoc

Co-authored-by: Wylie Conlon <wylieconlon@gmail.com>

* Update docs/user/dashboard/dashboard.asciidoc

Co-authored-by: Wylie Conlon <wylieconlon@gmail.com>

* Update docs/user/dashboard/aggregation-reference.asciidoc

Co-authored-by: Wylie Conlon <wylieconlon@gmail.com>

* Review comments

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Co-authored-by: Wylie Conlon <wylieconlon@gmail.com>
2020-09-03 16:34:25 -05:00

193 lines
5.8 KiB
Text

[[tutorial-visualizing]]
=== Visualize your data
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.
To begin, open the menu, go to *Dashboard*, then click *Create new dashboard*.
[float]
[[compare-the-number-of-speaking-parts-in-the-play]]
=== Compare the number of speaking parts in the plays
To visualize the Shakespeare data and compare the number of speaking parts in the plays, create a bar chart using *Lens*.
. Click *Create new*, then click *Lens* on the *New Visualization* window.
+
[role="screenshot"]
image::images/tutorial-visualize-wizard-step-1.png[Bar chart]
. 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"]
image::images/tutorial-visualize-bar-1.5.png[Bar chart]
. *Save* the chart with the name `Bar Example`.
+
To show a tooltip with the number of speaking parts for that play, hover over a bar.
+
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`.
[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*`.
+
Since the default search matches all documents, the pie contains a single slice.
. In the *Buckets* pane, click *Add > Split slices.*
.. From the *Aggregation* dropdown, select *Range*.
.. From the *Field* dropdown, select *balance*.
.. Click *Add range* until there are six rows of fields, then define the following ranges:
+
[source,text]
0 999
1000 2999
3000 6999
7000 14999
15000 30999
31000 50000
. Click *Update*.
+
The pie chart displays the proportion of the 1,000 accounts that fall into each of the ranges.
+
[role="screenshot"]
image::images/tutorial-visualize-pie-2.png[Pie chart]
. Add another bucket aggregation that displays the ages of the account holders.
.. In the *Buckets* pane, click *Add*, then click *Split slices*.
.. From the *Sub aggregation* dropdown, select *Terms*.
.. From the *Field* dropdown, select *age*, then click *Update*.
+
The break down of the ages of the account holders are displayed
in a ring around the balance ranges.
+
[role="screenshot"]
image::images/tutorial-visualize-pie-3.png[Final pie chart]
. Click *Save*, then enter `Pie Example` in the *Title* field.
[float]
[role="xpack"]
[[visualize-geographic-information]]
=== Visualize geographic information
To visualize geographic information in the log file data, use <<maps,Maps>>.
. 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`.
+
[role="screenshot"]
image::images/gs_maps_time_filter.png[Time filter for Maps tutorial]
.. Click *Update*
. Map the geo coordinates from the log files.
.. Click *Add layer > Clusters and grids*.
.. From the *Index pattern* dropdown, select *logstash*.
.. Click *Add layer*.
. Specify the *Layer Style*.
.. 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*.
+
[role="screenshot"]
image::images/tutorial-visualize-map-2.png[Map]
. 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*.
[float]
[[tutorial-visualize-markdown]]
=== Add context to your visualizations with Markdown
Add context to your new visualizations with Markdown text.
. Click *Create new*, then click *Markdown* on the *New Visualization* window.
. In the *Markdown* text field, enter:
+
[source,markdown]
# This is a tutorial dashboard!
The Markdown widget uses **markdown** syntax.
> Blockquotes in Markdown use the > character.
. Click *Update*.
+
The Markdown renders in the preview pane.
+
[role="screenshot"]
image::images/tutorial-visualize-md-2.png[]
. Click *Save*, then enter `Markdown Example` in the *Title* field.
[role="screenshot"]
image::images/tutorial-dashboard.png[]
[float]
=== Next steps
Now that you have the basics, you're ready to start exploring your own system data with {kib}.
* To add your own data to {kib}, refer to <<connect-to-elasticsearch,Add data to {kib}>>.
* To search and filter your data, refer to {kibana-ref}/discover.html[Discover].
* To create a dashboard with your own data, refer to <<dashboard, Dashboard>>.
* To create maps that you can add to your dashboards, refer to <<maps,Maps>>.
* To create presentations of your live data, refer to <<canvas,Canvas>>.