d3-voronoi-treemap usage
The global economy by GDP is depicted as a Voronoi treemap within a polygon shaped like Earth, with cell areas representing each country's GDP share. It uses the `d3-voronoi-treemap` plugin to partition the circle, a 60-gon, based on nested JSON data. The visualization applies D3 v6 for rendering, an SVG layout, and a color legend for continents. Data is sourced from a JSON file containing country weights, and the plugin is built on `d3-weighted-voronoi` and `d3-voronoi-map`.
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 representing our Earth) 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.6)
- d3-voronoi-treemap plugin
- blockbuilder.org
- (part of) https://github.com/ArlindNocaj/Voronoi-Treemap-Library for a Java implementation