Visualize your data
In Visualize, you can shape your data using a variety of charts, tables, and maps, and more. In this tutorial, you’ll create four visualizations:
Pie chart
Use the pie chart to gain insight into the account balances in the bank account data.
- Open then menu, then go to Visualize.
Click Create visualization.
Click Pie.
On the Choose a source window, select
ba*
.Initially, the pie contains a single “slice.” That’s because the default search matches all documents.
To specify which slices to display in the pie, you use an Elasticsearch bucket aggregation. This aggregation sorts the documents that match your search criteria into different categories. You’ll use a bucket aggregation to establish multiple ranges of account balances and find out how many accounts fall into each range.
In the Buckets pane, click Add > Split slices.
- From the Aggregation dropdown, select Range.
- From the Field dropdown, select balance.
- Click Add range four times to bring the total number of ranges to six.
Define the following ranges:
0 999
1000 2999
3000 6999
7000 14999
15000 30999
31000 50000
Click Update.
Now you can see what proportion of the 1000 accounts fall into each balance range.
Add another bucket aggregation that looks at 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.
Click Update.
The break down of the ages of the account holders are displayed in a ring around the balance ranges.
Click Save, then enter
Pie Example
in the Title field.
Bar chart
Use a bar chart to look at the Shakespeare data set and compare the number of speaking parts in the plays.
Click Create visualization > Vertical Bar, then set the source to
shakes*
.Initially, the chart is a single bar that shows the total count of documents that match the default wildcard query.
Show the number of speaking parts per play along the y-axis.
- In the Metrics pane, expand Y-axis.
- From the Aggregation dropdown, select Unique Count.
- From the Field dropdown, select speaker.
- In the Custom label field, enter
Speaking Parts
.
Click Update.
Show the plays along the x-axis.
- In the Buckets pane, click Add > X-axis.
- From the Aggregation dropdown, select Terms.
- From the Field dropdown, select play_name.
- To list the plays alphabetically, select Ascending from the Order dropdown.
- In the Custom label field, enter
Play Name
.
Click Update.
Save the chart with the name
Bar Example
.Hovering over a bar shows a tooltip with the number of speaking parts for that play.
Notice how the individual play names show up as whole phrases, instead of broken 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 asnot analyzed
.
Markdown
Add formatted text to your dashboard with a markdown tool.
- Click Create visualization > Markdown.
In the text field, enter the following:
# 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.
Save the tool with the name
Markdown Example
.
Map
Using Maps, you can visualize geographic information in the log file sample data.
- Click Create visualization > Maps.
Set the time.
- In the time filter, click Show dates.
- Click the start date, then Absolute.
- Set the Start date to May 18, 2015.
- Click now, then Absolute.
- Set the End date to May 20, 2015.
- 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.
Set the Layer Style.
- From the Fill color dropdown, select the yellow to red color ramp.
- From the Border color dropdown, select white.
Click Save & close.
The map looks like this:
- Navigate the map by clicking and dragging. Use the controls to zoom the map and set filters.
- Save the map with the name
Map Example
.