Skip to content

WeightedTreemaps

Generate and Plot Voronoi or Sunburst Treemaps from Hierarchical Data

v0.1.4 · Dec 12, 2024 · GPL-3

Description

Treemaps are a visually appealing graphical representation of numerical data using a space-filling approach. A plane or 'map' is subdivided into smaller areas called cells. The cells in the map are scaled according to an underlying metric which allows to grasp the hierarchical organization and relative importance of many objects at once. This package contains two different implementations of treemaps, Voronoi treemaps and Sunburst treemaps. The Voronoi treemap function subdivides the plot area in polygonal cells according to the highest hierarchical level, then continues to subdivide those parental cells on the next lower hierarchical level, and so on. The Sunburst treemap is a computationally less demanding treemap that does not require iterative refinement, but simply generates circle sectors that are sized according to predefined weights. The Voronoi tesselation is based on functions from Paul Murrell (2012) <https://www.stat.auckland.ac.nz/~paul/Reports/VoronoiTreemap/voronoiTreeMap.html>.

Downloads

252

Last 30 days

17544th

689

Last 90 days

2.6K

Last year

Trend: -4.6% (30d vs prior 30d)

CRAN Check Status

2 ERROR
2 NOTE
10 OK
Show all 14 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-macos-arm64 OK
r-devel-windows-x86_64 ERROR
r-oldrel-macos-arm64 NOTE
r-oldrel-macos-x86_64 NOTE
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 ERROR
Check details (4 non-OK)
ERROR r-devel-windows-x86_64

examples

Running examples in 'WeightedTreemaps-Ex.R' failed
The error most likely occurred in:

> ### Name: drawTreemap
> ### Title: drawTreemap
> ### Aliases: drawTreemap
> 
> ### ** Examples
> 
> # load package
> library(WeightedTreemaps)
> 
> # generate dummy data
> df <- data.frame(
+   A = rep(c("abcd", "efgh"), each = 4),
+   B = letters[1:8],
+   size = c(37, 52, 58, 27, 49, 44, 34, 45)
+ )
> 
> # compute treemap
> tm <- voronoiTreemap(
+   data = df,
+   levels = c("B"),
+   cell_size = "size",
+   shape = "circle",
+   positioning = "regular",
+   seed = 123
+ )
NOTE r-oldrel-macos-arm64

installed package size

installed size is 12.6Mb
  sub-directories of 1Mb or more:
    doc    1.4Mb
    libs  10.4Mb
NOTE r-oldrel-macos-x86_64

installed package size

installed size is 12.8Mb
  sub-directories of 1Mb or more:
    doc    1.4Mb
    libs  10.6Mb
ERROR r-release-windows-x86_64

examples

Running examples in 'WeightedTreemaps-Ex.R' failed
The error most likely occurred in:

> ### Name: drawTreemap
> ### Title: drawTreemap
> ### Aliases: drawTreemap
> 
> ### ** Examples
> 
> # load package
> library(WeightedTreemaps)
> 
> # generate dummy data
> df <- data.frame(
+   A = rep(c("abcd", "efgh"), each = 4),
+   B = letters[1:8],
+   size = c(37, 52, 58, 27, 49, 44, 34, 45)
+ )
> 
> # compute treemap
> tm <- voronoiTreemap(
+   data = df,
+   levels = c("B"),
+   cell_size = "size",
+   shape = "circle",
+   positioning = "regular",
+   seed = 123
+ )

Check History

ERROR 11 OK · 2 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Mar 11, 2026
ERROR r-devel-windows-x86_64

examples

Running examples in 'WeightedTreemaps-Ex.R' failed
The error most likely occurred in:

> ### Name: drawTreemap
> ### Title: drawTreemap
> ### Aliases: drawTreemap
> 
> ### ** Examples
> 
> # load package
> library(WeightedTreemaps)
> 
> # generate du
...[truncated]...
),
+   B = letters[1:8],
+   size = c(37, 52, 58, 27, 49, 44, 34, 45)
+ )
> 
> # compute treemap
> tm <- voronoiTreemap(
+   data = df,
+   levels = c("B"),
+   cell_size = "size",
+   shape = "circle",
+   positioning = "regular",
+   seed = 123
+ )
NOTE r-oldrel-macos-arm64

installed package size

installed size is 12.6Mb
  sub-directories of 1Mb or more:
    doc    1.4Mb
    libs  10.4Mb
NOTE r-oldrel-macos-x86_64

installed package size

installed size is 12.8Mb
  sub-directories of 1Mb or more:
    doc    1.4Mb
    libs  10.6Mb
NOTE 12 OK · 2 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026
NOTE r-oldrel-macos-arm64

installed package size

installed size is 12.6Mb
  sub-directories of 1Mb or more:
    doc    1.4Mb
    libs  10.4Mb
NOTE r-oldrel-macos-x86_64

installed package size

installed size is 12.8Mb
  sub-directories of 1Mb or more:
    doc    1.4Mb
    libs  10.6Mb

Dependency Network

Dependencies Reverse dependencies colorspace dplyr lattice Rcpp scales sf sp tibble WeightedTreemaps

Version History

new 0.1.4 Mar 10, 2026
updated 0.1.4 ← 0.1.3 diff Dec 11, 2024
updated 0.1.3 ← 0.1.2 diff Nov 3, 2024
updated 0.1.2 ← 0.1.1 diff Jan 8, 2024
new 0.1.1 Dec 12, 2023