The figure below is an example of creating a treemap using JMP and Microsoft Excel (hereafter referred to as Excel) for data with a large number of categories.JMP uses the "Graph Builder" platform.

At first glance, since both programs can draw similar graphs, you might think "there's no difference no matter which software I use."
However, JMP offers treemap features that are unique to JMP.
Treemaps are graphs that are suitable for visually comparing multiple categories, and each category is intuitively represented by its size. They are characterized by their ability to easily grasp the overall structure and trends even when there is a large amount of information.
In this article, we will introduce the basic steps for creating treemaps using JMP's Graph Builder and five features of JMP treemaps.
Basic steps to create a treemap in JMP
We will mainly use the JMP sample data "Nic Adverse Events.jmp". This data records adverse events (symptoms, abnormalities, etc.) that occurred in a clinical trial. Each adverse event (medium classification) belongs to a larger category (major classification). For example, adverse events such as high blood pressure, low blood pressure, and vascular stenosis are classified as vascular diseases.

As can be seen from the bar graph above, many types of adverse events were reported, and in these cases, a treemap visualization is extremely useful.
Basic Operation
Launch "Graph Builder", drop [Adverse Event Name] (medium classification) onto "X", and select [Treemap] from the icons at the top. Basically, this is how you can create a treemap.

Furthermore, if you want to nest the major classification (in this example, the classification of adverse events) and the sub-classification, add the column corresponding to the major classification to the X-axis and drop it in a nested manner. This will display adverse events grouped by the classification of adverse events.

Decorate the treemap as necessary. In the example below, "Organ Class or Organ Class" is specified as [Color], and "Group Label" (label of the major class) is specified as [Top].

Five features of JMP's "Treemap"
Here are five key benefits of creating treemaps in JMP:
Advantage 1: Linking graphs and data tables
As you know, graphs and tables work together in JMP. When you click on a rectangle (tile) that you want to examine in the treemap, the corresponding row is selected in the data table, making it easy to explore relationships with other variables and trends in the occurrence of adverse events under specific conditions.

Advantage 2: Individual data can be handled as is
This time, we are dealing with raw data that records each and every adverse event for each patient. In principle, it is not possible to create a treemap for this type of data in Excel, so it is necessary to use a pivot table or similar to tally up the frequency of each item (in this example, the number of adverse events).
In JMP, you can automatically count individual data and create a treemap. Or, if your data has already been counted, you can drop a frequency column (e.g., "N") into the Frequency zone in the bottom right to create a treemap with the frequency values reflected in the tile area.

Advantage 3: Flexible layout adjustment
JMP gives you a lot of flexibility in how you arrange your treemaps. Here are three examples:
Rectangle division
You can adjust the arrangement of tiles with the "Layout" options. In many cases, using the "Rectangular Division" option below will result in a treemap that is visually easier to understand.
Split: The default setting. The rectangles are arranged according to the order of the values in the specified column.
"Rectangular division": The rectangle with the larger degree is placed in the upper left and the rectangle with the smaller degree is placed in the lower right.

Directional Bias
The slider allows you to adjust the aspect ratio of the rectangle. When the slider is to the left, it will be displayed vertically, and when the slider is to the right, it will be displayed horizontally.

Sorting by another variable
By specifying a variable in the [Y] zone, you can place tiles in an order based on that variable.
The figure below is a treemap created based on the area of each prefecture. In this case, the order of longitude (X axis) and latitude (Y axis) can be determined by dropping the columns showing the longitude and latitude corresponding to the prefectural capitals of each prefecture into the [Y] zone. You can see that it is a map that roughly shows the relative positions of each prefecture within a large rectangle.

Advantage 4: Displaying degrees on tiles
Treemaps can visually show size by area, but if the difference in area is small, it may be difficult to see the exact frequency. When you move the cursor close to a tile, you can display the frequency of the title in the hover label, but you may want to display the frequency for all tiles.
In such cases, you can check the "Size Column Value" option to display the frequency on the tile.

Advantage 5: Narrowing down analysis conditions using local data filters
The JMP Local Data Filter feature allows you to filter the data being analyzed based on specified criteria and redraw the graph, including treemaps.
The following is a treemap when narrowing down the condition by severity = "SEVERE". In this example, we can see that there are many cases of neurological and vascular diseases.

We hope you will take advantage of JMP's treemaps.
by Naohiro Masukawa (JMP Japan)
Naohiro Masukawa - JMP User Community