mirror of
https://github.com/bitbaum/solon.git
synced 2026-12-04 12:47:33 +01:00
* feat(statistics): the law beside the numbers — series, law links, timelines, axes, saved views
Implements the roadmap section {#stats} (docs/design/2026-11-freedom-laws-statistics.md):
- Series as facts: a `statistic` block on metrics (definition, publisher,
series code); World Bank (WDI API) and OECD (SDMX) adapters; five series
for CH, LI, EE and US, read monthly; a publisher's 5xx is retried twice.
- An append-only `statistic_records` log for law links, events and
enforcement, written from a curated, source-checked list by
`statistics:sync` and the daily places cron; three links checked against
Fedlex and Riigi Teataja.
- /statistics (ranked bars, axes with reader or group weights),
/statistics/<metric> (line chart, a timeline of linked acts' versions over
the same years, the law, enforcement, sources), /statistics/view/<sha256>;
on @bitbaum/chartkit; five languages.
- Saved views under the sha256 of their spec; a proposal that links one
carries it as evidence (proposal_evidence), attached in the same
transaction.
- Roadmap and changelog updated; what remains is listed with its reason.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmsX15QgjkDp9MQaQ92
* feat(statistics): law event pages, clickable timelines, maps, scatter, parallel coordinates, reader-built axes
- Events: what changed (wording before/after), how it came about, votes with
party breakdowns, who initiated/sponsored/recommended/opposed, claims and
critiques kept apart from what happened, each line with the page it was read
on; five loaded (Estonia 2023, US TCJA 2017, two Swiss firearms ballots,
Kennesaw 1982). /statistics/event/<slug>, /statistics/events; timeline marks
open them; the numbers around an event (line cut at the change, peers apart,
a before/at/after table).
- Numbers that mean the same everywhere: central-government-only series
retired for all-levels OECD series; a per-statistic scope sentence; central
share of tax as a decentralisation proxy; SDMX series told apart by `match`.
- A world map per statistic on geo-kit, /statistics/compare scatter, parallel
coordinates per axis, a reader-built axis kept in the link, saved axes.
- Fetch: four retries with backoff and a pause between a source's requests.
- Tests, roadmap, changelog and design note updated.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmsX15QgjkDp9MQaQ92
---------
Co-authored-by: Claude <noreply@anthropic.com>
109 lines
3.6 KiB
JSON
109 lines
3.6 KiB
JSON
{
|
|
"name": "solon",
|
|
"version": "0.1.0",
|
|
"packageManager": "pnpm@11.25.0",
|
|
"engines": {
|
|
"node": ">=20"
|
|
},
|
|
"private": true,
|
|
"license": "MIT",
|
|
"scripts": {
|
|
"dev": "next dev",
|
|
"build": "next build",
|
|
"start": "next start",
|
|
"lint": "eslint .",
|
|
"typecheck": "tsc --noEmit",
|
|
"design:check": "node scripts/design-system-check.js",
|
|
"verify": "pnpm run format:check && pnpm run lint && pnpm run typecheck && pnpm run design:check && pnpm run check:places-literals && pnpm run test",
|
|
"test": "vitest run",
|
|
"test:e2e": "playwright test",
|
|
"test:puppeteer": "BASE_URL=${BASE_URL:-http://localhost:3000} node tests/puppeteer/smoke.mjs",
|
|
"test:puppeteer:mega": "BASE_URL=${BASE_URL:-http://localhost:3000} node tests/puppeteer/mega-menu.mjs",
|
|
"format": "prettier --write .",
|
|
"format:check": "prettier --check .",
|
|
"db:generate": "drizzle-kit generate",
|
|
"db:migrate": "drizzle-kit migrate",
|
|
"db:push": "drizzle-kit push",
|
|
"check:vendored-drift": "node scripts/check-vendored-drift.mjs",
|
|
"places:sync-config": "tsx scripts/places-sync-config.ts",
|
|
"places:import": "tsx scripts/places-import.ts",
|
|
"places:import-files": "tsx scripts/places-import-files.ts",
|
|
"places:fetch": "tsx scripts/places-fetch.ts",
|
|
"statistics:sync": "tsx scripts/statistics-sync.ts",
|
|
"statistics:quality": "tsx scripts/statistics-quality.ts",
|
|
"statistics:verify": "tsx scripts/statistics-verify.ts",
|
|
"law:register": "tsx scripts/law-register.ts",
|
|
"law:text": "tsx scripts/law-text.ts",
|
|
"check:places-literals": "node --import tsx scripts/check-places-no-literals.ts",
|
|
"check:law-search": "tsx scripts/check-law-search.ts"
|
|
},
|
|
"dependencies": {
|
|
"@better-auth/passkey": "^1.7.14",
|
|
"@bitbaum/accountkit": "^0.27.0",
|
|
"@bitbaum/ai-kit": "^1.24.0",
|
|
"@bitbaum/chartkit": "^0.7.0",
|
|
"@bitbaum/chatkit": "^0.22.1",
|
|
"@bitbaum/geo-kit": "^0.3.0",
|
|
"@bitbaum/mail-kit": "0.2.0",
|
|
"@bitbaum/searchkit": "^0.2.3",
|
|
"@fleet/design-tokens": "npm:@bitbaum/design-tokens@^1.5.2",
|
|
"@modelcontextprotocol/sdk": "^1.32.2",
|
|
"@napi-rs/canvas": "^1.1.0",
|
|
"@noble/hashes": "2.4.0",
|
|
"@noble/secp256k1": "3.2.0",
|
|
"@scure/base": "^2.4.0",
|
|
"better-auth": "^1.7.14",
|
|
"bip-kit": "^0.6.1",
|
|
"bs58check": "^4.0.0",
|
|
"clsx": "2.1.1",
|
|
"d3-geo": "3.1.1",
|
|
"diff": "^8.0.4",
|
|
"drizzle-orm": "^0.45.4",
|
|
"fflate": "^0.8.3",
|
|
"lucide-react": "1.65.0",
|
|
"next": "16.4.3",
|
|
"next-intl": "^4.14.9",
|
|
"pdfjs-dist": "6.4.299",
|
|
"pg": "^8.23.1",
|
|
"proj4": "2.22.0",
|
|
"react": "19.3.1",
|
|
"react-dom": "19.3.1",
|
|
"tailwindcss": "4.3.3",
|
|
"tesseract.js": "^7.0.0",
|
|
"topojson-client": "3.1.0",
|
|
"topojson-server": "3.0.1",
|
|
"topojson-simplify": "3.0.3",
|
|
"unpdf": "^1.9.1",
|
|
"us-atlas": "^3.0.1",
|
|
"world-atlas": "^2.0.2",
|
|
"zod": "^4.6.7"
|
|
},
|
|
"devDependencies": {
|
|
"@electric-sql/pglite": "^0.5.13",
|
|
"@playwright/test": "1.64.1",
|
|
"@tailwindcss/postcss": "4.3.3",
|
|
"@types/d3-geo": "^3.1.1",
|
|
"@types/geojson": "^7946.0.16",
|
|
"@types/node": "26.6.6",
|
|
"@types/pg": "^8.23.1",
|
|
"@types/proj4": "^2.19.0",
|
|
"@types/react": "19.3.0",
|
|
"@types/react-dom": "19.3.0",
|
|
"@types/topojson-client": "^3.1.5",
|
|
"@types/topojson-server": "^3.0.4",
|
|
"@types/topojson-simplify": "^3.0.3",
|
|
"@types/topojson-specification": "^1.0.5",
|
|
"drizzle-kit": "^0.31.11",
|
|
"eslint": "10.14.0",
|
|
"eslint-config-next": "16.4.3",
|
|
"espree": "^11.2.0",
|
|
"postcss": "8.5.32",
|
|
"prettier": "3.9.10",
|
|
"puppeteer": "25.16.0",
|
|
"ts-node": "10.9.2",
|
|
"tsx": "^4.23.15",
|
|
"typescript": "^6.0.3",
|
|
"vitest": "^5.0.5"
|
|
}
|
|
}
|