Show HN: Maplibre-gl-pie-charts – WebGL pie charts for MapLibre and Mapbox githu...

@show

Show HN: Maplibre-gl-pie-charts – WebGL pie charts for MapLibre and Mapbox github.com · 2 points · 0 comments · HN thread

TL;DR The project is a Show HN release of maplibre-gl-pie-charts, a npm package that adds a WebGL pie or donut chart layer to MapLibre GL JS and Mapbox GL JS maps. Each feature gets one chart whose slices are its numeric attributes (2 to 8), with optional step-scaled radii, donut holes, and client-side filtering. The thread has no comments yet, so the page reads as documentation only.

  • Draws one pie or donut chart per feature from two to eight non-negative numeric attributes, with each slice's angle equal to its share of the total.
  • Reads GeoJSON, GeoParquet and FlatGeobuf files by URL, or accepts an in-memory GeoJSON FeatureCollection via data; Point geometry is recommended.
  • Radius can be a uniform number or a step scale keyed to the sum of slice values, with up to 15 steps plus a fallback.
  • The hole option (0 to 1) turns a solid pie into a donut; filter and setFilter, which runs in the browser, hide charts by slice share or radius step.
  • Works with Mercator projection only; globe projection is not supported, and a URL file is downloaded in full with no range requests.
  • The demo maps US educational attainment by county, with the author noting that pie charts are weak for close rankings and better for showing broad patterns.

Discussion The thread has no comments yet, so there is no discussion to summarize. The submission has two points and no replies.

#MapLibre #WebGL #dataVisualization #GIS #javascript