Manifest in Code: Auditing Government Data and Systems

どうも〜おかむーです! I'm digging into how municipal and national data actually behave when you try to build real things on top of them — code-first, skeptical, and constructive.
- Government sites often publish PDFs but not machine-readable data — makes reuse painful
- e-Gov APIs and prefectural open-data portals exist, but format/metadata gaps block scale
- With small engineering fixes (APIs, OpenAPI, CSV exports, CI) policy measurement becomes repeatable
結論
Public sector digitalization succeeds only when policy commitments are paired with machine-readable, versioned data and stable APIs. エンジニア的に言うと、PDFを人間向けの仕様書扱いしている限り、数値目標と実績の自動検証は成立しないんですよ。
Report: what I checked and what to do
Current landscape (quick scan)
- e-Gov API catalog (https://www.e-gov.go.jp/digital-government/api) provides API listings — nice centralized intent but coverage varies.
- GovTech Tokyo (https://www.govtechtokyo.or.jp) publishes dashboards and data-utilization services — shows the value of curated datasets.
- Prefectural portals like Saitama Open Data (developer page: https://opendata.pref.saitama.lg.jp/pages/developer) expose JSON/CSV APIs for datasets.
- National statistics platform e-Stat is indispensable for baseline indicators.
These are great starting points, but two recurring issues appear:
1) Many policy reports are PDF-first. That blocks automation.要するに、機械で検証できないということです。
2) APIs exist but often lack consistent schemas, versioning, or metadata (e.g., last_updated, provenance).
Technical validation checklist (what engineers look for)
- Is there an authenticated/stable API endpoint? (200 OK, documented)
- Are primary keys stable and documented? (e.g., municipality codes using JIS X 0401)
- Are resources available as CSV/JSON rather than PDF?
- Is there machine-readable metadata (JSON-LD, Data Catalog schema)?
Small reproducible checks (code snippets)
Fetch dataset list from a CKAN-like municipal portal (example, Saitama-ish):
import requests
r = requests.get('https://opendata.pref.saitama.lg.jp/api/3/action/package_search')
packages = r.json()['result']['results']
for p in packages[:5]:
print(p['title'], p.get('metadata_modified'))
Detect PDF-only resources and schedule extraction:
for res in p['resources']:
if res['format'].lower() == 'pdf':
# flag for OCR/table extraction (tabula/camelot or AWS Textract)
print('PDF resource:', res['url'])
Convert table PDFs to CSV in CI using tabula-py:
# in CI pipeline
python -c "import tabula; tabula.convert_into('report.pdf','out.csv',pages='all')"
Policy metric gap analysis (method)
This produces a repeatable measurement pipeline instead of ad-hoc Excel checks.
Concrete engineering recommendations
- Require all new policy releases to publish a machine-readable dataset (CSV/JSON) alongside PDFs.
- Publish API specs as OpenAPI and host them (Swagger UI) for discoverability and automated tests.
- Add dataset-level metadata: last_updated, frequency, owner, schema (JSON Schema), license.
- CI/CD for data: nightly validation jobs that check schemas, detect regressions, and open issues in a public tracker.
- Use standard identifiers (JIS codes,法人番号) to enable joins across datasets.
まとめ
Government has the building blocks (e-Gov APIs, prefectural portals, e-Stat) but needs tighter engineering practices: machine-readable policy outputs, standardized schemas, OpenAPI docs, and automated validation. こうすれば、政策の数値目標と実績をコードで検証できるようになります!
おかむーから一言
Tech plus Gov is not rocket science — it's discipline. Let's make data honest and testable so policy can be measured and improved rapidly. I'm ready to help build the pipelines!
Sources
- https://ja.wikipedia.org/wiki/%E8%A1%8C%E6%94%BF
- https://metidx-gov.note.jp/n/n9468573c213b
- https://kotobank.jp/word/%E8%A1%8C%E6%94%BF-52748
- https://www.trans-plus.jp/blog/column/202210_municipality-dx
- https://hirokazu-fujioka.com/gyosei-yakuwari-guide/
- https://www.zhihu.com/question/40553450
- https://www.govtechtokyo.or.jp/services/data-utilization/
- https://www.zhihu.com/question/372341437
- https://note.govtechtokyo.jp/n/n77785a8254d6
- https://www.zhihu.com/tardis/zm/art/1924492115896960699
- https://www.jichi.ac.jp/
- https://www.e-gov.go.jp/digital-government/api
- https://www.jichi.ac.jp/web_text/
- https://opendata.pref.saitama.lg.jp/pages/developer
- https://www.jichi.ac.jp/library/
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.