Chapter 2 Data Visualization: Google Data Studio
Bar and line charts allow for faster and more accurate interpretation than tables or complex graphics.
— Adapted from Cleveland & McGill, Graphical Perception, 1984
2.1 Data Visualization
\[\underline{\textbf{What is Data Visualization?}}\]
Data visualization is the process of presenting analyzed data in visual formats—like charts, maps, tables, and dashboards—to make information easier to see and understand. Its main goal is to communicate insights clearly, allowing viewers to quickly grasp key comparisons and spot important patterns
Exercise 2.1 Interact with the dashboard above and answer:
How many provinces are there in Thailand, and how many regions in total?
Which province has the largest area?
What are the total population and GPP of the central region?
2.2 Google Data Studio
2.2.1 What is Google Data Studio?
\[\underline{\textbf{What is Google Data Studio?}}\]
Google Data Studio (now Looker Studio) is a free tool from Google that allows you to connect, visualize, and share data via interactive and customizable dashboards and reports.
2.2.2 Why Use Google Data Studio?
\[\underline{\textbf{Advantages of Google Data Studio}}\]
Completely free and user-friendly
Connects to multiple data sources
Updates data in real time
Supports flexible access control
Dashboards are responsive and easily shareable across devices
Example 2.1 (Looker Studio’s Connectors)
Looker Studio’s connectors enable linking to various data sources in a few clicks.
Figure 2.1: Built-in Connectors in Looker Studio
Example 2.2 (Looker Studio’s Sharing Feature)
Looker Studio dashboards can be embedded in webpages using an iframe, making sharing seamless.
Figure 2.2: Embedding Looker Studio Dashboard via HTML iframe
2.2.3 Working Principles of Google Data Studio
The core functioning of Looker Studio follows three main steps: Connect \(\rightarrow\) Visualize \(\rightarrow\) Share.
Figure 2.3: Core Principles of Google Data Studio—Connect, Visualize, and Share
2.2.4 Google Data Studio Interface
Top toolbar and sidebar layout (buttons 1–8 and chart settings 9–12):
Figure 2.4: Top Toolbar Buttons (1-8) and Right Sidebar Chart Settings (9-12)
| No. | Button | Description |
|---|---|---|
| 1 | Undo / Redo | Undo or redo your last actions |
| 2 | Selection Tool | Select and move objects (charts, text, etc.) |
| 3 | Add Page | Insert a new page into the report |
| 4 | Add Data | Connect a new data source |
| 5 | Add a Chart | Insert visual elements like bar, geo charts, tables, etc. |
| 6 | Add a Control | Add UI controls like drop-downs, sliders, date pickers |
| 7 | Insert Image / Shape / Text | Add images, text boxes, lines, or shapes |
| 8 | Theme and Layout | Customize the report’s design and colors |
| No. | Section | Description |
|---|---|---|
| 9 | Data Source | View, switch, or blend connected data sources |
| 10 | Dimension | Select categorical variables for grouping or breaking down data |
| 11 | Metric | Choose numerical values for calculations or comparisons |
| 12 | Filter / Date Range | Apply filters or define the date field to control visible data |
2.3 Workshop: Thailand Provincial Dashboard
In this section, I will guide you step by step to create a dashboard similar to the one shown at the beginning, using Thailand province data. Along the way, I will introduce the essential components of Google Data Studio.
Note: The dataset is provided for demonstration purposes only and may not reflect precise or up-to-date information.
2.3.1 Data Preparation
Exercise 2.2 (Connect Data Source to Google Sheets Connector)
Download the dataset via this link.
Open Google Sheets and import the Excel file (
File\(\rightarrow\)Import\(\rightarrow\)Upload)Launch Looker Studio choose Blank Report.
Figure 2.5: Google Data Studio Start Page
- Once you’re inside the new report, click the Add data button. A list of connectors will appear—choose the Google Sheets connector.
Figure 2.6: Google Data Studio Start Page
- Select the Google Sheet you created earlier. Then, choose the worksheet that contains your data and click Add to link it to your report.
Figure 2.7: Add Thai Province Data Source to Looker Studio
2.3.2 Overview of the Dashboard
Figure 2.8: Thailand Provincial Dashboard Anatomy
Charts (items \((1)–(5)\)) are added using Add a chart button (Toolbar Button 5)
Images (item \((6)\)), including the Thai flag, are inserted via Insert/Image/Shape/Text (Button 7)
Conditional formatting (item \((7)\)) is available in Style tab when you select a table.
Figure 2.9: Applying Conditional Formatting to a Table in Looker Studio
2.3.3 Creating the Dashboard: Your Turn
In this section, you will build the Thailand Provincial Dashboard step by step. While the final goal is to recreate the full dashboard, you will complete each part independently with the help of hints and guidance provided below.
The Table
Tasks:
Add a table with six dimensions: Province name, Region, Population, Area (km2), Urban Population (%), GPP (Billion).
Hint: Click on the table, navigate to the Setup tab, and add each field under the Dimension section.
As you may notice, the original column names differ from the names displayed in the table above. Rename the fields to match the labels shown in the figure.
Hint: Click the pencil icon next to each dimension to edit it, then type the new display name.
- Observe that conditional formatting has been applied to the \(\text{GPP}\) column using three rules:
Provinces with \(0 \le \text{GPP} < 100\) are color yellow
Provinces with \(100 \le \text{GPP} < 500\) are color orange
Provinces with \(\text{GPP} \ge 500\) are color red
Now, apply the same rules to your table using three colors of your choice.
Hint: Follow these steps
Click the table, navigate to the Style tab, and scroll down to the Conditional formatting section. Click Add formatting, and a new window will pop up that let you to Create rules.
Choose the column you want to apply the condition to. To create a range like \(a \le x < b\), add two conditions:
One with GREATER THAN OR EQUAL TO \(a\)
One with LESS THAN \(b\)
Then click AND to combine them into a single rule.
In Color and Style, avoiding selecting Entire row—this will color the entire row, which is not the desire outcome in this case.
Repeat the same steps to create the remaining two rules.
The Pie Chart
The pie chart in the dashboard displays the total population by region (not by individual province). In this case, the dimension is Region, and we introduce a new concept called a metric. For the metric, select Sum of Population to show the total population for each region.
Tasks:
Set up the pie chart by selecting Region as the dimension and Population as the metric. Make sure the aggregation is set to Sum.
Hint: See the figure below
Add the title Regional Population Distribution to the pie chart.
Hint: Look for this setting under Style tab of pie chart
The Scorecards
The four scorecards display key information that gives users a quick overview.
Tasks: Create four scorecards to display the following summary metrics:
Total provinces
Total population
Total area (km2)
Total GPP (in billion Baht)
Geo Chart
The geo chart provides a geographical view of the entire country. As shown in the figure, we can easily spot Nakhon Ratchasima, which is shaded darker than many other provinces—indicating it has a relatively larger area.
Tasks: Create a geo chart that displays the area of each province in Thailand.
Hint: There are two warnings
The dimension for the geo chart should be Province name. However, by default, this field is treated as plain text, which causes a warning in the geo chart.
To fix this, you need to change the type of the Province name column:
Go to Resource > Manage added data sources > Edit.
In the Type field for the Province name column, set it to Country subdivision (1st level)
By default, the geo chart displays a map of the United States. Be sure to change the Zoom area setting to Thailand.
Filter Control
The dashboard includes four controls of two types: Region and Urbanization level use drop-down lists, while Population and GPP (in Billion) use sliders.
These filter controls can be easily created by clicking the Add a control button (item 6 in the toolbar). The only slightly tricky part is customizing the Urbanization level drop-down list, which requires grouping the values into meaningful ranges instead of using raw individual values.
To do this, we need to create a calculated field called Urbanization Level that categorizes the numeric urban population percentages into labeled groups. For example:
CASE
WHEN Urban Population (%) BETWEEN 0 AND 10 THEN '0-10%'
WHEN Urban Population (%) BETWEEN 10.01 AND 25 THEN '11-25%'
WHEN Urban Population (%) > 25 THEN 'Over 25%'
ELSE 'Other'
ENDHomework
All exercises are group activities.
Recreate the Thailand Provincial Dashboard using the material provided in the ZIP file below. Clearly list all group members in your submission and share the completed dashboard on Google Classroom.
Download the data below, create your own dashboard and share your work via Google Classroom.