Kibana - Introduction to Visualizations - Building a Visualization

Kibana's power is in the ease with which you can create impressive visualizations for the data sets that you are looking for. This article will cover some of our favorite visualizations and when you would be using them, but we encourage you to explore others that are available. 

Types of Visualizations

Lens - Kibana Lens, is an easy-to-use, intuitive UI that simplifies the process of data visualization through a drag-and-drop experience, so is a great place to get started with building a visualization. Lens also provides the ability to change up the visualization style to match the data set that is returned (ex: changing from a bar chart, line chart or data table).

Lens.png

Maps - Kibana Maps allows for you to plot various data points across a regional map allowing for quick visualizations of things such as heatmap of average spend across a region or maybe just wanting to see a visualization of where your members are concentrated and total revenues from that post code. 

member_map.png

Aggregation Based - often referred to as the 'Classic Kibana' (slowly being replaced by Lens), this area encompasses all the visualizations and some additional functionality not yet delivered in Lens (like Scripting) - but is more rigid in the usage and flexibility. Most of Ticketure's existing Kibana visualizations are created in this style (as Lens didn't exist when the visualizations were created).

chart.png

Build Your Lens Visualization

In building a visualization you are always looking to answer a question with data.

Exercise:  We want to be able to answer, over the last month, how many net tickets were sold, what was the net total revenue, the average face value of those tickets, and the average number of days before the event they were purchased, grouping those events by Sales Channel (web, CMS, POS, etc.)

For most Visualizations, Lens is going to be the easiest and most flexible option. We often use Lens as a starting point and if we need to jump into scripted content or other things that Lens is still catching up on, we have a basis for the report and can then mirror that in the Aggregation Based visualization. 

To start creating a visualization, click the 'Create Visualization' button from Kibana's Visualization Library page (the default page when you open Kibana within Ticketure) and select 'Lens' from the New Visualization menu. 

Kibana_-_Lens.png

You then will see an Empty Lens visualization ready for your "painting". The following screenshot highlights key navigation areas used when creating your visualization (best if viewed on a desktop).

Kibana_UX.png

1. Filters - used for filtering down the content within the visualization - ex: event_category = 'Admission'

2. Index Selection - the Index that will be used for pulling the data

3. Fields Listing - the available fields within the index (hint: clicking on one of the fields will show you a sample of the data within the field.

4. Date Range Selector - The date range are you wanting the Index to show in the visualization

5. Visualization Type Selector - Controls how the data in the Index is visualized

6. Fields in the Visualization - What fields are in the Visualization

7. Visualization - The final visualization

Step 1 - Select Your Index

Per the earlier Get Your Index article, the Index is the center of the visualization and impacts all areas of the visualization from available fields down to the impact of the Date Range Selector. For this visualization, we are wanting to look at tickets purchased over a period of time - this will be the 'Transaction By Occurrence' Index. Selecting the Transaction By Occurrence index provides a list of fields for continued visualization building. 

Why is it not Transaction By Session?

Given we are answering tickets sold during a period of time (Last Month), not tickets sold FOR events that last month, we know we are looking at when actions 'occurred' not by the 'session' to which they are sold. A very subtle difference but very important to get right.

Step 2 - Add Fields to the Visualization

Now that we have our Index, we need to start adding fields to the visualization. To do that simply use the 'Search field names' option to look up the field name you want. In this case, the 'Channel_id' indicates where the ticket was sold. So we can search for the field and drag it out onto the Visualization.

Kibana_-_Add_Channel.gif

Lens will look at the data being visualized and suggest a few options for best representing the data, typically starting with a Bar chart. It also defaults the metric (or what we are counting) to 'count' which isn't too useful in most cases and not in this exercise. We can choose any of the data visualization suggestions to see the data in other formats, but for this visualization we want to see the data in a data table (good ole pivot table). We can change the visualization type via the Visualization Type Selector and select Data Table. We also will want to add some additional fields to help complete our visualizations. 

In this part, we will perform the following:

  • Change the report to a table view
  • Add field - after_fees_value - this is the total amount paid for the ticket
  • Add field - purchased_qty - always 1 or -1
  • Add field - face_value - face value of the ticket
  • Add field - days_to_event - days from the event the ticket was purchased

Kibana_-_Add_Fields.gif

Step 3 - Select Proper Aggregation, Give Labels, Total

You may have noticed that the fields could be added easily, but the calculations default to 'Median' for all numbers which aren't very useful and doesn't answer our questions. Also, the captions don't really tell me what the fields are - so doubt anyone could easily consume the report. Now that we have the data fields we want, let's set the proper aggregations, and labels and provide some total fields so others can consume them.

In this part we will perform the following:

  • Remove the 'Count' metric as it isn't needed
  • Update the aggregations to be what we want to see 
  • Give proper labels to the fields
  • Add a total at the bottom

Step 4 - Ensure Proper Filtering

Last but not least is to ensure that the filters for both the dates and the fields are set correctly. For starters we will need to Date Range Selector to Last Month. This can be done by either by selecting the specific (or Absolute) dates you desire from the Selector or by leveraging Relative date selection. For this visualization, we will use the Relative date option as we want to always look at 'Last Month'. 

It's All About the Actions

In addition, to the Date Range Selector, we also need to ensure that we are not pulling in too much data. As you recall from the details of the Transaction By Indexes, these indexes contain ALL Actions that happen for a ticket, so in the current state, this visualization is pulling in purchases, refunds, redemptions, force_redeems, etc. So in otherwords too much data and we need to filter this data down to just the 'actions' that we care about.

Actions can be thought as being divided into 2 'groupings'. The actions taken on tickets, and the cart related actions, which are typically related to payments towards the tickets.

Actions in Transaction By Indexes

  • purchased - ticket action for the purchase of a ticket
  • refunded - ticket action for the refund of a ticket
  • redeemed - ticket action for the redemption of a ticket within its scan window
  • force_redeemed - ticket action for the redemption fo a ticket outside scan window or duplicate scan
  • transfer_from - ticket action for the session from which a ticket was transferred from
  • transfer_to - ticket action the session to which a ticket was transferred into
  • held - ticket action for a ticket being placed into a held cart
  • released - ticket action for a ticket being released from a held cart
  • capture - payment action for a payment being captured
  • refund - payment action for a payment being refunded (not 'ed' is only variance between ticket and payment action).

For this visualization we are only looking at the tickets sold, so per the above so we will define a filter by 'action_code' and include 'purchased' and 'refunded' actions only. Given we also only want to see tickets - we will want to excluded Donations and Memberships which are classed by the field 'event_category'. 

In this part, we will perform the following:

  • Set Date filters to Last Month
  • Add action_code filter for 'purchased' and 'refunded'
  • Remove Donations and Memberships from the calculations

Kibana_-_Filters.gif

And there you have your first visualization. Click Save, give the visualization a name and you are all set!


Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.