Looker makes it easy to create graphics and charts based on the results of a query. This tutorial introduces you to Looker's data visualizations. When you finish, you'll be able to create and configure charts.
Your Good Looks Should Look Good!
The Explore page in Looker lets you immediately add an eye-catching chart to any query result set. Looker keeps query details and visualization configuration data together, so when you share a query, people get the picture as well as the data.
Let's continue our ecommerce store example, and create a graphic for a sales dashboard. We'll query the total items sold (ORDER ITEMS Count), grouped by date (ORDERS Created Date) and pivoted on item category (PRODUCTS Category Name). The query is shown below. We filter by ORDERS Created Date and PRODUCTS Category Name, to limit our results to 90 days of sales for a set of categories that are interesting to the business.
Visualizations Bring Data to Life
On the Explore page, click the Visualization tab to configure visualization options for the current query. Use the chart buttons to pick the visualization that's right for the data.
All of Looker's visualization options, and the settings that relate to them, are discussed in more detail on the Visualization Types page.
Configuring Visualizations to Add Polish
Customizing Visualizations with Chart Settings
Let's go with a stacked area chart to show the sales for each category over time. We can customize it to make the data more readable and to add visual styling. Click the chart settings button to configure the visualization parameters, then play around to get a result that suits you.
Specifying LookML Fields to Include in the Visualization
All dimensions and measures are automatically added to any visualizations you use. However, sometimes you won't want to display every dimension or measure in the chart. In the example below, note that the measures Accidents Serious Accidents Count, Accidents Fatal Accidents Count and Accidents Total Fatalities are displayed:
To hide a column from the visualization, select the gear icon at the top right corner of the column, then select Hide from Visualization:
This will hide the column from the visualization. In the example below, the LookML field Accidents Total Fatalities is hidden from the visualization, leaving only Accidents Serious Accidents Count and Accidents Fatal Accidents Count in the chart.
Table calculations can also be hidden from a visualization, as described on the Using Table Calculations page.
Filling in Missing Dates and Values
Some data sets and Looks will have missing data. This is very common when you pull data by a timeframe, when certain dates / weeks / months / etc. don't have any corresponding value. Looker's "dimension fill" feature allows you to fill in this missing data.
For example, this accident data from 1990 shows only a few dates in which an accident occurred:
If you do not dimension fill, Looker connects the data points it has, resulting in a potentially misleading graph:
Turning on dimension fill adds the missing dates and makes the graph more informative:
To use dimension fill simply choose the Fill in Missing Dates or Fill in Missing Values option from the gear menu of the appropriate dimension:
Dimension fill is available for dimensions with yes/no values, tiered values, and most date types. It can also be applied to any dimension based on a list of values, via the
Dimension fill will turn on automatically for queries that run with a single dimension and/or a single pivot, just as long as you haven't applied filters to any measures.
There are a few cases when you will not be able to dimension fill, though Looker will warn you if you stumble into one of these situations:
- Dimensions that make use of the
- Dimensions that have a filter applied to them and also have a fixed number of values, such as yes/no, days of the week, days of the month, etc.
Drilling Into Visualizations
Looker makes it possible to "drill" into the data on a visualization, to get more specific information about a specific data point. To do so, simply click on the part of the visualization about which you'd like more information.
You can choose which type of drill to perform when you click on the item of interest. In the example below, we're clicking on the "Search" slice of the "Female" donut chart on the left. Doing so gives you two different options. You can choose to see row level data for all 1,438 females who found us via search, or you can choose to filter the visualization to females only.
If you chose the Filter on "Female" option, you'd arrive at a visualization like this one:
The options that appear to you will change depending upon the data and visualization you're using.
Viewing Visualizations on Mobile Devices
When viewing a visualization on a mobile device, Looker has the following touch options to make it easier to view information about your data:
- Tap a data point on the visualization to show information about that data point.
- Press and hold a data point to drill into the data behind the data point.
- Press and drag across the visualization to show information about each data point as you move over them.