d3-voronoi-treemap usage
This block demonstrates the d3-voronoi-treemap plugin by visualizing global GDP distribution from a JSON dataset. Using D3 v4 and SVG rendering, it partitions a hexagonal (60-gon) convex polygon into nested Voronoï cells, where each cell’s area encodes a country’s share of world GDP. The treemap is grouped by continent, with each region assigned a distinct color, and countries are labeled with their names and GDP percentages. The visualization is an adaptation of HowMuch.net’s “Global Economy by GDP” article, implemented as an interactive, data-driven treemap that highlights the hierarchical structure of economic output.
AI-generated descriptionThis 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 :
- D3.js (v.4)
- d3-voronoi-treemap plugin
- blockbuilder.org
- (part of) https://github.com/ArlindNocaj/Voronoi-Treemap-Library for a Java implementation
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>