What is a heat map?
A Heat Map visualizes data through color variations. Generally, there are two types of heat maps – grid and geographical. Grid maps are useful to cross-examine multi-variable data, by placing variables in rows and columns and shading their respective cells within the table. This is to understand the degree of relationship between two variables. Geographical maps, on the other hand, are used to indicate the level of events/activities in different systems. Heats Maps allow us to view data points and clusters of activities.
When to use a heat map
Heat Maps are particularly appealing to analyze changing trends over time. They are popularly used to present data like population, diversity, income levels, social trends, weather conditions and many other geographical measures. For example, a Heat Map can be used to analyze the changes in temperature across various cities of a country over a period of 5 years.
How to create a heat map
Grid Heat Map
We will create an example Grid Heat Map using Chartio, a self-service business intelligence tool for cloud analytics.
Similar to every chart, the first step is to gather data and choose the categories that are most important to represent.
For this example, we will use data from the Chartio Demo Source that comes with Chartio and details marketing campaign cost and the breakdown by date and channel.
Here’s a step by step process of creating a Grid Heat Map using Chartio –
- Click ‘Explore’ on the top left in the navigation bar to start exploring your data. (Typically, a chart type is automatically selected based on the data selected. If you want a specific chart, pre-select it from the chart type. This gives a brief description of how to arrange your data.)
- Use the Data Source (These sources are connections to your external data such as databases and CSV files) dropdown to select the data source you want to use to build your chart. Select Chartio Demo Source. Each table in the selected data source is listed in the sidebar and can be expanded to view its columns. Click Marketing.
- Drag a field (such as Cost or ID) to Measures. Measures aggregate your data using math functions such as Sum of Data. Drag Cost into the Measures field. Click it to open its settings, and change the Aggregation to Total sum of Marketing Cost. Change the label accordingly, then click Ok.
- Drag a field (such as Created Date and Description) to Dimensions. Dimensions group your data, such as by Date or Product Type. Drag Created Date into the Dimensions field. Click it to open its settings, and change the Time Bucket to Month of Marketing Created Date. Change the label accordingly, then click Ok. Likewise, drag Description into the Dimensions field. Click it to open its settings, and Sort them in Ascending order. Change the label accordingly, then click Ok.
- Drag a field such as Created Date to Filters (it is an optional step, depending on your data set.) Filters set a condition to allow you to filter through your data. For example, when you drag Created date, click on it and select between and set a date range, then click Ok. In this example, we do not use any filter.
- Click Run Query. You can change the Chart Title or even review Chart Settings.
- Click Save Chart. You can further add more layers or even transform data in addition to the above steps. (NOTE – Refer to the basic chart and snapshot below for an overview of chart creation. You can hover the cursor on the map to review the label)
Geographic Heat Map
Below is a simple step by step process to create a Geographic Heat Map using Excel –
- Open a new Excel Sheet and input necessary data. (In this example, let’s create a small sample data set based on Country and its Population, else you can import data from any other source in CSV format).
- Click on Insert tab and select Office Add-Ins. Select Store in the pop-up window and search for Geographic Heat Map and click on Add.
- Click on Get Started to create the map.
- Click on Choose Map and select the appropriate one, in this example it is World map. Next, click on Select Data and select the data we created i.e., ‘Country’ and ‘Population’ and click on OK. The ‘Regions’ and ‘Values’ are automatically selected based on the selected data. You can adjust the Color Theme, in this example we prefer Green to Red. Green referring to lower population and red referring to higher. Give a suitable Title and click on Save.
- A map is generated in the range of green to red representing populations of countries. You can hover your cursor around the map to review labels.
Best practices for creating heat maps
- To better understand heat maps, it is important to select colors appropriately. Instead of using a mix of colors, it is advisable to use a single color with varying shades or a spectrum between two contrast colors to show the degree of impact/effect.
- Choosing appropriate data ranges is key. Since the scales are represented by colors – uniformity is unavoidable, else it leads to misinterpretation of data.
- Heat maps rely on color to communicate data. Hence, it is better to use them to display a very generalized view of numerical data since it is hard to accurately tell the difference between numerous color shades and extract specific data points unless you particularly include raw data in the cells, which will be chaotic.