Skip to main content
100%

geoVoronoi.hull()

✓ Published0🌍 Public
PPhilippe Rivière
Last edited Aug 31, 2021
Created on Sep 8, 2016

This example visualizes the convex hull of country bounding boxes grouped by World Bank subregion on a rotatable, zoomable orthographic globe. It cycles through subregions, highlighting the spherical convex hull computed from the corners of each country's bounding box. Built with d3-geo-voronoi's `geoVoronoi().hull()` and `d3.geoPath()`, it renders SVG paths for countries, hull polygons, and sites. The code loads country GeoJSON data, applies special handling for Antarctica and French Guiana, and supports drag-to-rotate and zoom interactions.

AI-generated description

Use geoVoronoi.hull to compute the convex hull of a set of points in spherical coordinates.

Countries are grouped by their (World Bank) subregion, and we extract the bounding box for each of them. Then we highlight the convex hull of the set of all corners of the bounding boxes.

(With a special treatment for Antarctica and French Guyane.)

Watch, drag, and zoom.

mit Licensed

Similar vizzes