Code-First Manifest: Evaluating Local Government Data, APIs and UX from an Engineering Lens

どうも〜おかむーです! Today I want to look at municipal and national government data through the lens of an engineer — "code speaks the manifesto" style. I’ll show where things are good, where they get stuck in PDFs, and pragmatic fixes you can ship.
- Government websites often have great intent but ship data as PDFs, not machine-readable formats.
- APIs like e-Gov and Tokyo’s Open Data exist, but coverage and schema hygiene are uneven.
- Practical fixes: OpenAPI specs, CSV/JSON-first publishing, CI for data quality, small UX copy wins.
結論
Public-sector data is close to being useful for real products, but two gaps block it: inconsistent machine-readability (PDFs instead of CSV/JSON) and missing developer-friendly contracts (OpenAPI/schema). エンジニア的に言うと、API + schema + CIで大半は解決しますよね。
Report: what I checked and what it tells us
What I looked at
- e-Gov API catalog (e-gov.go.jp) — an official API hub with promising entries.
- Tokyo Open Data portal (portal.data.metro.tokyo.lg.jp) — exposes endpoints like GET /PublicFacility.
- Digital Agency guidance and machine-readable rules draft (digital.go.jp) — pushes Excel/CSV over PDF.
- Case studies on UX improvements (Zenn, Shibuya examples) and UX pitfalls in municipal digital services.
これ見てくださいよ:Digital Agency’s draft rules explicitly call out CSV/Excel as Level 1 machine-readable formats, and recommend avoiding PDF for tabular stats. 要するに、PDFは人間のため、CSV/JSONは機械のため、ということです。
Technical gaps observed
- PDFs as canonical publications: datasets published only in PDF mean extra ETL work (OCR/manual parsing). That increases friction and breaks automation.
- API surface inconsistency: some APIs exist (e-Gov, Tokyo), but schemas are weakly typed or undocumented. No uniform OpenAPI specs to validate client expectations.
- UX and microcopy: forms and endpoints expose bureaucratic terms; this hurts adoption.
Concrete engineering evidence and reproducible checks
- Try fetching Tokyo’s PublicFacility API (example):
import requests
r = requests.get('https://api-tokyo.example/PublicFacility?limit=10')
print(r.status_code)
data = r.json()
print(data['results'][0].keys())
- If the first step fails or returns HTML/PDF, that’s a hard blocker. 要するに、API should return JSON and a consistent schema.
Policy targets vs reality
Many local governments publish targets in PDFs (e.g., sustainability or accessibility goals) but provide no machine-readable time series. Without numeric CSVs, you can’t programmatically verify progress or join datasets — so the gap between target and verifiable outcome widens.
Practical improvement plan (engineering-first)
Sample CI check (pseudocode):
# validate CSV schema
python validate_csv.py --schema schema.json --input latest.csv
fail CI if mismatch
Open data — where value is unlocked
- Joinable, timestamped CSVs enable dashboards, machine-learning models, and civic alerts.
- Provide webhook or changefeed for datasets so downstream apps can react to updates.
- Encourage community reuse with sample notebooks and data packages.
まとめ
政府・自治体のデータは道半ばだけど、技術的対処は明快です。PDFを二次出力にして、CSV/JSONを一次ソースにし、OpenAPI/JSON SchemaとCIで品質を守れば、データはぐっと使いやすくなります。UXは言葉とサンプルで改善可能 — 小さい投資で市民と開発者の両方が得しますよね!
おかむーから一言
テクノロジーで行政をアップデートするのは難しくない。小さなAPIと一貫したスキーマを積み上げれば、市民サービスは確実に良くなる。やりましょう!
Sources
- https://zenn.dev/govtechtokyo/articles/b65dc687e50918
- https://picks-design.com/blog/5751/
- https://lg.reserva.be/ux-design/
- https://www.trans-plus.jp/blog/column/202210_municipality-dx
- https://note.com/leal_wasp2727/n/n9eb1ff8bdcb5
- https://www.jichi.ac.jp/
- https://www.e-gov.go.jp/digital-government/api
- https://www.jichi.ac.jp/web_text/
- https://portal.data.metro.tokyo.lg.jp/opendata-api/
- https://www.jichi.ac.jp/library/
- https://www.zhihu.com/question/290714454
- https://www.digital.go.jp/assets/contents/node/basic_page/field_ref_resources/256dcba6-b936-4031-b88d-3abb27e27f9b/f7af0ca4/20260331_meeting_executive_outline_06.pdf
- https://www.zhihu.com/question/6430289390
- https://www.soumu.go.jp/menu_news/s-news/01toukatsu01_02000186.html
- https://www.zhihu.com/question/38923279
Share
Related Reports

Code-driven Manifesto: Auditing Local Gov Data and Systems (Kagawa case study)
Local gov systems run but hide data behind UIs; expose CSV/JSON, APIs, and common schemas to unlock value.

Code-driven Check: Japan’s Open Data and the Machine-Readable Gap
Digital Japan has dashboards and rules, but PDFs and messy formats still block automated policy verification; mandate CSV/JSON, APIs, and dataset linting.

Code Speaks: Testing Japan's Gov Data and Dashboards
Japan has great dashboards but inconsistent machine-readability. This report inspects e-Stat, Japan Dashboard, Kantei PDFs, and proposes API-first fixes and practical code examples.