mirror of
https://github.com/wassname/moral-maps.git
synced 2026-09-24 13:41:05 +08:00
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:
co-authored by
PI[gpt-5.6-terra]
parent
cb37fff44f
commit
92d7acef65
@@ -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));
|
||||
Reference in New Issue
Block a user