Analytics Tutorial
How to build your first custom dashboard
Last updated
How to build your first custom dashboard
Last updated
Welcome to the tutorial for Travel Eye's analytics feature. On this page, you will learn how to create a dashboard with multiple panels, and how to query, visualize and export data.
First, create a new dashboard and — since dashboards are empty by default — a new panel by clicking the “Add dashboard” button followed by “Add panel”:
You are now in the panel editor. From here, you can define a query and select how you want to visualize the data.
For the first panel, let's visualize the number of users in your organization.
As explained in the introduction, numeric values are called “Measures”, so let's click on the “+Measure” button and explore our options:
Unfortunately, there is no “Users – Count” measure to select here. However, a quick look at the data dictionary reveals that the measure “People – Count” includes users as well.
Click on the “People – Count” measure to add it to the query, and use the “Update preview” button to see the result.
Now you see the number of people, but not necessarily the number of users, since users are a subset of people:
Luckily, there is an “Is user” dimension (or attribute) that allows you to remove records of people who do not have a user account yet.
Dimensions can be used in two different ways:
Adding the dimension to the list of selected dimensions splits the dataset by the values of that dimension.
Adding the dimension as a filter will remove non-matching records from the result set.
Let's explore both options to see how they affect the result.
Start by clicking on the “+Dimension” button and select the Is user dimension under “People”. Also change the visualization type to “Table” and update the preview:
The resulting table contains two rows: One for people who do not have a user account (“Is user” is false) and one row for people who do (“Is user” is true).
This happens because the dimension “Is user” is a so-called “flag” (also known as a “boolean value”) whose only possible values are “true” and “false”.
Other dimensions have a wider range of values. For example, the dimension “Last name” contains a separate value for each unique last name in the database.
Now let's see what happens when you use the dimension as a filter instead.
Deselect the “Is user” dimension by clicking the little “X” button next to its name. Click on the “+Filter” button and select “Is user” from the drop-down menu.
Note the empty drop-down list that appears to the right of the filter. In addition to the attribute to be filtered by, a filter always needs an operator (e.g. “equals”, “contains”, “greater than”, etc.) and usually also a value.
Since you want to see the number of people who have a user account, select the operator “equals”, set the filter value to “True”, and update the preview:
Now the table only contains a single row and a single column. Unlike adding a dimension, adding a filter does not split the result set into multiple parts. It only removes records that do not match the filter from the result set.
Although the table now only contains the number of people who have a user account, there is one more point you need to consider: time.
Without specifying a time frame, the number you see is the total number of users that have ever existed (see data lifecycle), not the number of users that exist right now.
To fix this, you need to understand how Travel Eye handles historical data. There are two types of records: Those which represent immutable, historical facts and those which represent data that can change over time.
Status requests are an example of immutable facts. If a person answers a status request with “OK” then this becomes a historical fact. Even if the person answers future status requests differently, the fact that the previous status request was answered with “OK” does not change.
In contrast, data about people changes all the time. A particular person may have been a traveller last week, but now the trip is over, and they are no longer a traveller. The same logic applies to whether a person is a user or not. The following table illustrates how Travel Eye stores data in the “People” dataset:
Row # | Person ID | First name | Last name | Is user | Valid from | Valid to |
---|---|---|---|---|---|---|
1 | 1 | Marty | McFly | ❌ | 1955-01-01 | 1985-07-01 |
2 | 3 | Biff | Tannen | ❌ | 1955-04-01 | 1955-09-01 |
3 | 3 | Biff | Tannen | ✅ | 1955-09-01 | ∞ |
4 | 2 | Emmett | Brown | ❌ | 1955-09-01 | ∞ |
5 | 1 | Marty | McFly | ✅ | 1985-07-01 | ∞ |
Scroll to the right to see all columns of the table.
Each record has a “valid from” and “valid to” date that indicates the time range during which a particular version of the record was valid. Whenever the data about a person changes, a new row is inserted into the table and the “valid to” date of the record's previous version is updated accordingly.
If you want to know how many users you had in October 1955, the system would need to look at rows 1, 3 and 4 and calculate an “1” as the answer.
The same query for July 1985 needs to evaluate rows 3, 4 and 5 and yields an answer of “2”.
In data warehousing, this approach is known as a Type 2 slowly changing dimension (SCD).
SCDs can be queried by selecting “Valid on” of the respective cube as the time dimension of your query.
To specify that you are only interested in users who have an account right now, you need to select a time dimension in the query.
Adding a time dimension does two things: First, it allows you to specify the time range of data that you want to analyse. Second, it allows you to group the results by a time interval, e.g. by week or by month.
Click on the “+Time” button and select the “People – Valid on” dimension from the drop-down menu. Then use the drop-down at the top of the page to change the time frame to “Today” and update the preview:
Now you finally have the correct number of users currently registered in Travel Eye. However, it is likely that you want to see how this number changes over time.
To achieve this, change the visualization type back to “Bar chart”, reset the time frame to “Last 90 days” and change the granularity of the time dimension from “Day” to “Week”. Finally, update the preview to display the number of users over time as a bar chart.
To finish this panel, give it a meaningful name and click the “Add panel” button at the top of the page. You can then resize and move the panel to its target location on the dashboard.
Now try to apply what you have learned so far and add another panel to your dashboard that shows a bar chart for the number of country stays in the last 90 days, broken down by risk level.
If you did everything right, your dashboard should now look like this:
For reference, your query for the country stay panel should look like this:
The selected measure is “Country stays – Count” because you want to display the number of country stays.
Since you want to display the number of country stays per country risk level, you have to select the “Countries – Historical risk level” dimension to split the total number of country stays by the different country risk levels.
Like people, country stays can change over time (they begin on a certain date and last until the person enters a different country), which is why you select “Country stays – Valid on” as the time dimension.
The granularity of the time dimension is set to “Day” because you want to visualize the number of country stays per day.
Finally, the visualization type is set to “Bar chart”.
In many cases it is desirable to process your Travel Eye data in another software (e.g. Excel). Travel Eye allows you to export the raw data of any panel as an Excel or CSV file.
To do so, open the context menu of a panel and click on the menu item “Export”. Select the desired file format and click the “Start download” button.
This concludes the tutorial. To learn more about the data available and the other features of the analysis page, see the following topics:
The Panel EditorData Dictionary