@rembish/nm-unp-topojson
v1.0.0
Published
TopoJSON world map with 265 NomadMania UN+ regions
Downloads
97
Maintainers
Readme
nm-unp-topojson
Public-domain TopoJSON world map with 265 polygons matching the NomadMania UN+ region list.
Install
npm install @rembish/nm-unp-topojsonCDN
https://unpkg.com/@rembish/nm-unp-topojson/unp-265.json
https://unpkg.com/@rembish/nm-unp-topojson/unp-265-markers.jsonFiles
| File | Size | Description |
|------|------|-------------|
| unp-265.json | 220 KB | Full-detail TopoJSON, 265 polygon features |
| unp-265-markers.json | 264 KB | Compact variant: tiny territories (< 1 000 km²) replaced with Point markers |
Usage
import topology from "@rembish/nm-unp-topojson/unp-265.json";
// or fetch from CDN:
const topology = await fetch("https://unpkg.com/@rembish/nm-unp-topojson/unp-265.json").then(r => r.json());
// with topojson-client:
import { feature } from "topojson-client";
const regions = feature(topology, topology.objects.merged);Feature Properties
Each feature carries:
| Property | Type | Description |
|----------|------|-------------|
| unp_index | int | NomadMania UN+ region number (1–265, alphabetical) |
| name | str | Region name |
| region | str | Geographic macro-region (11 values, see below) |
| sovereign | str | Sovereign state |
| type | str | country, territory, subnational, disputed |
| iso_a2 | str|null | ISO 3166-1 alpha-2 |
| iso_a3 | str|null | ISO 3166-1 alpha-3 |
| iso_n3 | int|null | ISO 3166-1 numeric |
| marker | bool | true for point features (markers file only) |
| area_km2 | float | Area in km² (markers file only) |
Regions
Africa · Antarctica · Asia · Atlantic · Caribbean · Central America · Europe · Middle East · North America · Oceania · South America
Data Sources
All sources are compatible with public-domain or permissive licensing:
| Source | License | Use | |--------|---------|-----| | Natural Earth 10m | Public domain | Base polygons | | geoBoundaries | CC-BY | Supplementary admin boundaries |
Build
make venv # create .venv and install Python dev dependencies
make download # download Natural Earth 10m shapefiles
make all # build → simplify → markers → validate → distIndividual targets:
make build Run Python build pipeline → output/merged.geojson
make simplify Run mapshaper → output/unp-265.json (default: SIMPLIFY=3%)
make markers Build point-marker variant → output/unp-265-markers.json
make validate Validate output files
make dist Copy output files to project root
make check Lint + typecheck + test
make serve Serve viewer at http://localhost:8000/viewer.htmlTuning simplification:
make simplify SIMPLIFY=5% # more detail (larger file)
make simplify SIMPLIFY=1% # more compression (smaller file)Viewer
Open viewer.html in a browser after make dist (or make serve):
- Toggle between Full and Markers variants
- Hover features for name, region, sovereign, area
- Zoom and pan with mouse
License
Data: CC BY 4.0 — derived from Natural Earth (public domain) and geoBoundaries (CC-BY). Build tooling: MIT.
