Geo2rect test using nmap
✓ Published0🌍 Public
LLuisSevillano
Last edited Feb 9, 2017
Created on Feb 9, 2017
This example uses D3.js v4 and the geo2rect and nmap libraries to transform the districts of Madrid, Spain, from a GeoJSON polygon map into a rectangular treemap-like layout. The `geo2rect.compute` function converts each district's geographic boundaries into a rectangle, while the `nmap` algorithm arranges these rectangles in a grid. The visualization renders as SVG paths and an animated toggle control, highlighting the potential for spatial distortion when converting irregular administrative boundaries into a rectilinear grid.
AI-generated description