Data limits
GADM 4.1 predates the 2022 Papua split and does not match the current village register.
Five water-body features have been excluded. Names joined together in the source file
are split at capital letters, which occasionally produces odd results.
Areas come from simplified boundaries, so small urban wards are approximate. A centroid
can also fall outside its village: dots for groups of islands sometimes appear at sea.
How it is drawn
The map uses two canvases, one for land and one for dots. Village positions are projected
once with d3.geoMercator and stored in typed arrays. d3.zoom scales and shifts those
positions when you pan or zoom.
Dots outside the view are skipped. The rest are grouped by colour and drawn together,
reducing thousands of draw calls to about a dozen. Very small dots are drawn as squares.
For hover, the pointer is converted back to the original coordinates and d3.quadtree.find returns the nearest village. This avoids checking every dot on each pointer movement.
Pinch, ctrl+wheel or the buttons zoom; ordinary scrolling moves the page.
Data
GADM 4.1, level 4, simplified JSON. Centres and
areas are computed from the boundaries with d3-geo and written to a 3.4 MB file, under 1 MB
compressed. Names are stored as indexed lists. GADM is free for non-commercial use with attribution.