Visualize your data

edit

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

edit

Use the pie chart to gain insight into the account balances in the bank account data.

  1. Open then menu, then go to Visualize.
  2. Click Create visualization.

    tutorial visualize wizard step 1
  3. Click Pie.
  4. 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.

  5. In the Buckets pane, click Add > Split slices.

    1. From the Aggregation dropdown, select Range.
    2. From the Field dropdown, select balance.
    3. Click Add range four times to bring the total number of ranges to six.
    4. Define the following ranges:

      0             999
      1000         2999
      3000         6999
      7000        14999
      15000       30999
      31000       50000
  6. Click Update.

    Now you can see what proportion of the 1000 accounts fall into each balance range.

    tutorial visualize pie 2
  7. Add another bucket aggregation that looks at the ages of the account holders.

    1. In the Buckets pane, click Add, then click Split slices.
    2. From the Sub aggregation dropdown, select Terms.
    3. From the Field dropdown, select age.
  8. Click Update.

    The break down of the ages of the account holders are displayed in a ring around the balance ranges.

    tutorial visualize pie 3
  9. Click Save, then enter Pie Example in the Title field.

Bar chart

edit

Use a bar chart to look at the Shakespeare data set and compare the number of speaking parts in the plays.

  1. 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.

  2. Show the number of speaking parts per play along the y-axis.

    1. In the Metrics pane, expand Y-axis.
    2. From the Aggregation dropdown, select Unique Count.
    3. From the Field dropdown, select speaker.
    4. In the Custom label field, enter Speaking Parts.
  3. Click Update.
  4. Show the plays along the x-axis.

    1. In the Buckets pane, click Add > X-axis.
    2. From the Aggregation dropdown, select Terms.
    3. From the Field dropdown, select play_name.
    4. To list the plays alphabetically, select Ascending from the Order dropdown.
    5. In the Custom label field, enter Play Name.
  5. Click Update.

    tutorial visualize bar 1.5
  6. 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 as not analyzed.

Markdown

edit

Add formatted text to your dashboard with a markdown tool.

  1. Click Create visualization > Markdown.
  2. In the text field, enter the following:

    # This is a tutorial dashboard!
    The Markdown widget uses **markdown** syntax.
    > Blockquotes in Markdown use the > character.
  3. Click Update.

    The Markdown renders in the preview pane.

    tutorial visualize md 2
  4. Save the tool with the name Markdown Example.

Map

edit

Using Maps, you can visualize geographic information in the log file sample data.

  1. Click Create visualization > Maps.
  2. Set the time.

    1. In the time filter, click Show dates.
    2. Click the start date, then Absolute.
    3. Set the Start date to May 18, 2015.
    4. Click now, then Absolute.
    5. Set the End date to May 20, 2015.
    6. Click Update
  3. Map the geo coordinates from the log files.

    1. Click Add layer > Clusters and Grids.
    2. From the Index pattern dropdown, select logstash.
    3. Click Add layer.
  4. Set the Layer Style.

    1. From the Fill color dropdown, select the yellow to red color ramp.
    2. From the Border color dropdown, select white.
    3. Click Save & close.

      The map looks like this:

      tutorial visualize map 2
  5. Navigate the map by clicking and dragging. Use the controls to zoom the map and set filters.
  6. Save the map with the name Map Example.