Jun 13, 2023
4 min

Creating a Treemap on Big Pharma

author
PlotSet teamwriter

What is a Treemap with Categories

A treemap is a type of data visualization allowing you to represent hierarchical data. A treemap uses nested categories within a larger rectangle by dividing the larger rectangle into smaller ones. Each smaller rectangle represents a category or sub-category. Bear in mind that the size of each rectangle corresponds to the value associated with the category.

In this blog post, we are going to review the steps in creating a Treemap with Categories on Big Pharma by Market Cap.

Steps to Create a Treemap

The first thing to do is, of course, to get into your account. So, if you still don't have one, watch the following video: How to Create a Free PlotSet Account

The next step would be to choose the chart you have in mind, which right now is a treemap, from the template list. When you pick the chart, you will be automatically taken to the plotting area.

Set a title for your project now. This will help you to find your visualization easier in your dashboard. The dimensions of the templates are customizable, allowing you to fix them on a scale you prefer. Next, you need to insert your data.

If you wish to learn more about different ways to change data in the panel, you should check out the following blog post: 3 Easy Ways to Insert Data while Charting with PlotSet

Choose the data file from the computer. Then, hit the 'Upload' button. Make sure to check the columns' labels.

Bonus point!

In case you are wondering what nesting is, nesting refers to the hierarchical arrangement of data within the chart.  A rectangular area represents each category or group, often called a tile (or a leaf), within the treemap. The size and positioning of these tiles within the treemap visually convey the relative proportions of the data. In other words, the larger titles (leaves) represent higher-level categories, and the smaller ones represent their respective subcategories. Nesting the data makes the relationship and proportion between different categories easier to comprehend.

Treemap is one of the templates in which you can add images for each entity. If you wish to do that, you need to include a separate column in your data to mention the URL Address of the images you have in mind for each entity. Don't forget to mention the name of that column in the 'Image URL' field.

Pick a color palette to represent your data. You can choose one among the color palettes we have prepared for you. Or just enter your preferred hex codes to have a customized palette.

The Header is the place to put the primary title for your Treemap. In case you have more information, you can add a subtitle or possibly a note (if you have more to explain). You have the option to customize the font, size, and color of all of them.

A number formatter is a tool or feature that allows users to format numerical data according to their preferences. It provides options to control the appearance and display of numbers, such as specifying the number of decimal places, choosing a specific currency symbol, defining separators for thousands or millions, and determining the format for percentages or scientific notation.

The purpose of a number formatter is to enhance the readability and clarity of numerical data, making it easier for users to interpret and understand the information presented.

Using borders, you can add strokes (with your customized width) to the leaves in the Treemap. This option can make your data look more distinctive.

When it comes to the customization of Treemap and its leaves, there are a few things you should know. 

First thing first, you can choose the minimum and maximum sizes for the labels to display on each category. The 'Show total value' option allows you to represent the total value of a category as a whole (the sum of all the sub-categories). 

Then, we have the leaves or tiles. The 'padding' option determines the space between the leaves. The 'Intra-Category Spectrum' feature in the treemap allows you to visualize the variation or distribution of data within each individual category or nest. 

With this feature, the treemap displays a color gradient or spectrum within each rectangle representing a category. The color gradient represents the range or distribution of values within that category. Lighter or darker shades of the same color are used to indicate low to high values or any other specified range.

This feature is particularly useful when you want to explore and compare the internal composition or distribution of values within different categories.

Change the size of the images according to your preferences. Note that you can change the shape of the images as well. 

The 'aspect ratio' refers to the ratio between the width and height of the rectangular cells representing individual data elements or categories in the Treemap. It determines the shape and proportions of the cells within the Treemap layout.

You can obtain an export of your final design in either PNG, SVG, or JPG format.

You can also share your Treemap with a friend, embed it on your designated website, or share it on social media.

If you are interested, you can watch this chart's tutorial video on our YouTube channel: Let's Make a Treemap with Categories (Big Pharma)

We, the PlotSet team, are enthusiastic to spice up your storytelling world using data visualization, and we will show you how to do so through various blogs. If you’re into data journalism or you just want to present your data to an audience, we strongly suggest taking a look at what we have prepared for you here. Enjoy reading!

Related articles