Skip to main content
100%

d3-voronoi-treemap usage

✓ Published0🌍 Public
FFrissAnalytics
Last edited Sep 30, 2018
Created on Sep 30, 2018

This example shows the global economy by GDP as a Voronoi treemap, where the area of each cell represents a nation's economic weight, grouped by continent. The treemap is generated using the `d3-voronoi-treemap` plugin, which tesselates a circular polygon into nested, weighted cells. The data is loaded from a JSON file containing country GDP values, and visual hierarchy is computed with `d3.hierarchy`. The rendering uses SVG paths and text labels, with hover effects on each cell.

AI-generated description

This block illustrates the use of the d3-voronoi-treemap plugin. This block is a remake of the HowMuch.net's article The Global Economy by GDP.

The d3-voronoi-treemap plugin produces Voronoï treemap. Given a convex polygon (here, a 60-gon simulating a circle for each gender) and nested weighted data, it tesselates/partitions the polygon in several inner cells which represent the hierarchical structure of your data, such that the area of a cell represents the weight of the underlying datum.

Acknowledgments to :

forked from <a href='http://bl.ocks.org/Kcnarf/'>Kcnarf</a>'s block: <a href='http://bl.ocks.org/Kcnarf/fa95aa7b076f537c00aed614c29bb568'>d3-voronoi-treemap usage</a>

lgpl-3.0 Licensed

Similar vizzes