Code-Driven Manifesto: Evaluating Local Gov Data & UX from an Engineering Lens

IT Policy Proposals
Code-Driven Manifesto: Evaluating Local Gov Data & UX from an Engineering Lens

どうも〜おかむーです! Today I want to dig into how Japanese local governments publish data and design services — but with a coder's eye. Engineer-style, I'll show where machines and humans are happy, and where they're not.

  • Many municipalities publish PDFs but also some CSV endpoints — mixed machine-readability
  • UX improvements are underway, but APIs and structured KPIs are often missing or inconsistent
  • Practical fixes: publish validated CSV/JSON, add OpenAPI, CI for data, and standard KPI schemas

結論

Most local government initiatives are sincere and UX-focused (see GovTech Tokyo and ward redesigns), but the data layer is inconsistent: some useful CSVs exist (e.g. notice.go.jp status CSVs, ministry CSVs), while key strategy reports stay trapped in PDFs. 要するに、人向けの説明は良いけど、コードで再利用できる形にしてほしい、ということです。

Report: what I looked at and why it matters

Sources and what they reveal

These public items are representative:

  • Digital Agency hub (digital.go.jp): provides national guidance and momentum for DX
  • Policy KPI guidelines (chisou.go.jp PDF): sets expectation for measuring grants and projects
  • Municipal evaluation pages (e.g. Sukagawa city): show project-level reporting but often link to PDFs
  • Direct CSV endpoints (notice.go.jp/docs/status_nicter.csv, various ministry CSVs): concrete machine-readable data

These examples show a pattern: CSVs exist for some operational data, but strategic reports and KPI narratives are often PDFs. That forces manual extraction, slows audits, and blocks rapid civic applications.

Technical pain points (and code-ey observations)

  • PDF-first publishing: no stable schema, OCR required. Time-sink for engineers.
  • Inconsistent CSV formats: different encodings, header names in Japanese/English, date formats.
  • No API or ad-hoc scraping needed: brittle and costly.
  • KPI gaps: the guideline asks for KPI check/action (chisou.go.jp), but municipalities publish targets separately from periodic actuals, making gap analysis manual.

Engineer-friendly checklist:

  • Provide CSV/JSON with UTF-8, ISO 8601 dates, and stable column names
  • Publish OpenAPI/Swagger for any service endpoints
  • Attach machine-readable metadata (license, provenance, update cadence)

Code example: quick KPI gap check (Python/pandas)

import pandas as pd

kpi = pd.read_csv('https://example.gov/kpi_reports.csv')

normalize dates

kpi['period'] = pd.to_datetime(kpi['period'])

kpi['gap'] = kpi['target'].astype(float) - kpi['actual'].astype(float)

summary = kpi.groupby('project')[['gap']].mean()

print(summary.sort_values('gap', ascending=False))

要するに、CSVがちゃんとしてれば5行で状況把握できますよね。

Data validation and deployment pattern

  • Use frictionless-data (data package) or GoodTables to validate CSVs in CI
  • Publish data via a catalog (CKAN / data.go.jp style) with stable URLs
  • Automate daily ETL that writes both CSV and a small JSON API layer for apps

Privacy & security

Keep PII out of open CSVs. Use aggregated KPI numbers or differential privacy for sensitive stats. Authenticated APIs can expose richer data to approved partners.

Improvement proposals (concrete)

  • Mandate machine-readable KPI reporting: single CSV per project with fields [project_id, kpi_name, target, actual, period, source_url]
  • Provide OpenAPI for transactional services (application status, residency updates)
  • Use Git-based publication (GitHub/GitLab) + CI to run schema checks and publish artifacts
  • UX + data: when redesigning sites (GovTech Tokyo examples), include a Data tab with downloadable machine-readable files

まとめ

This is not a tech vs government fight — it's a tooling gap. Municipalities have the content and users in mind, but to unlock third-party innovation and robust auditability, data must be treated like code: versioned, validated, and API-first.

おかむーから一言

Tech and policy are同じ言語で語れるんですよ。データをコードのように扱えば、行政サービスはもっと早く、安く、公平になります!