Restyle React WVS map with static visual grammar

Co-Authored-By: PI[gpt-5.6-terra] <288921227+claudypoo@users.noreply.github.com>
This commit is contained in:
wassname
2026-09-17 07:44:35 +08:00
co-authored by PI[gpt-5.6-terra]
parent cb37fff44f
commit 92d7acef65
36 changed files with 2777 additions and 372 deletions
+13
View File
@@ -0,0 +1,13 @@
import fs from 'node:fs';
import { assertLayout } from './src/layout.js';
const path = process.argv[2] ?? '../../docs/wvs/wvs_map_data.json';
const data = JSON.parse(fs.readFileSync(path));
const { labels, geometry } = assertLayout(data);
const kinds = Object.values(labels).reduce((count, label) => ({ ...count, [label.kind]: (count[label.kind] ?? 0) + 1 }), {});
console.log(JSON.stringify({
labels: Object.keys(labels).length,
kinds,
bounds: geometry.bounds,
policy: 'expanding rings, increasing steps, marker obstacles, pairwise overlap and bounds assertions',
}, null, 2));