In this topic we're going to talk about how to create a Heatmap chart using Preset. A Heatmap is often used as a means to show relationships between variables. Data is plotted as colors, and the changes between colors can be used to discern the presence of patterns.
In this walkthrough, we will create a Heatmap based on publicly accessible data from 2019 that shows migration data from countries to the Mediterranean region.
In the instructions below, we will create a Heatmap that conveys the migration of people from global countries to the Mediterranean region with a minimum of 450 people from each country.
Step One: Getting Started
To start, log on to Preset and then select a workspace.
Next, let's define your datasource and select a chart type
At the top of the screen, select New. Then, in the drop-down menu, select Chart.
After you do this, the Create a new chart screen appears.
Step Two: Select a Datasource and Visualization
In the Choose a datasource field, select a data source.
Please see Connecting to Preset to learn how to add a datasource to Preset. Be sure to check out the Sample Data section to add Covid-19 data.
Next, in the Choose a visualization type field, click the Table (default) icon.
The Select a visualization type panel appears.
Look for the Heatmap type—or use the Search feature to filter by the word “Heat”—and then select.
After you've done this, go ahead and select the Create new chart button.
Step Three: Start Building your Chart
Now we're going to define the parameters of your new chart. To start, in the Datasource & Chart Type area, make sure that the Datasource and Visualization Type match what you just selected.
You can change either or both of these at any time!
For the Heatmap, the Time fields are used to select the time data we will use (Time Column) and the time period from which data will be included (Time Range).
- In this example, we will use the report_date option in the Time Column.
- For the Time Range, note that the datasource is from 2019; therefore, we will select No filter in order to access the complete dataset without any time filtration.
Here's what it looks like:
Next, let's have a look at the Query section.
A heatmap is designed to compare the relationship between two variables, with each variable being represented on a different axis.
For this walkthrough, we will assign the x-axis field to the arrival_country and the y-axis field to the origin_country.
In the Metric field, we want to look at the sum of arrivals over 450. To do this, we will select the arrivals_count metric and, when configuring, select the SUM aggregate.
Here's what it looks like:
To set up a number filter, in the Filters field, select SUM(arrivals_count). After selecting, re-select your choice and enter 450 after the greater-than > sign.
Here's an overview of the Query panel:
Okay, now let's visualize the Heatmap.
Step Four: Visualize the Chart
In the Content Panel, select Run Query.
Step Five: Refine and Customize the Chart
The Heatmap chart offers a number of customization options, such as changing the color, heatmap rendering, toggle & percentile toggles, and axis sorting.
In this example, we:
- Normalized data across the x-axis (Normalize Across field).
- Normalized all data (Normalize checkbox).
- Changed the color scheme.
"Normalizing" the data means that data is standardized and presented in relation to each other. This ensures that the colors used in this heatmap convey overall increases and/or decreases in migration levels.
Here are the above customizations:
...and here is the chart after re-running the query: