Code Speaks: Auditing Japan's Gov Data Pipelines and Dashboards

どうも〜おかむーです!今日はちょっとエンジニアっぽい話をしますよ〜
- GovTech Tokyo and Digital Agency are pushing dashboards and case studies, but many outputs remain PDFs or scattered endpoints
- Machine-readability (CSV/JSON/API) is the gating factor for reuse — PDFs kill developer velocity
- With modest engineering (APIs, OpenAPI, CI for data), local and national policy KPIs could become auditable and reusable
結論
政府・自治体はデータ公開の「最後の1メートル」が弱い。データはあるけどほとんどPDF、非標準フォーマット、APIが限定的で実装負担が高い。エンジニア目線では「CSV/JSON + stable API + metadata + examples」があれば、政策の実績対目標の差をリアルタイムに追えるようになる。具体的にはe-Statやgo.jpのリソースを基に、データパイプラインの自動化とOpenAPI提供を推す!
Report: what's happening and what's wrong
What I checked (sources)
- Digital Agency (digital.go.jp) — case studies and resources for data reuse
- GovTech Tokyo services (govtechtokyo.or.jp) — dashboard unification and shared components
- Digital田園都市交付金のKPI資料(chisou.go.jp)と県の実績PDF(pref.yamaguchi.lg.jp) — 実績とKPIがPDFで公開されている例
これ見てくださいよ:GovTech Tokyo はダッシュボードの体系化を進めているけど、実際のKPI値や年度推移はPDFの表だったり、スライド(PPTX)で配られていたりします。エンジニア的に言うと、これAPI一本で解決する話なんですよね。
Technical fail modes
- PDF-first publication: tables embedded in PDFs (chisou.go.jp, pref.yamaguchi.lg.jp). Hard to ingest automatically.
- No stable API schema: many local governments lack OpenAPI specs or versioned endpoints.
- Mixed formats: Excel, PPTX, PDFs, and ad-hoc CSVs with inconsistent headers and encodings.
- Weak metadata: no machine-readable schema (JSON Schema or DCAT), so consumers must reverse-engineer fields.
要するに:データはあるけどエンジニアが使うには手間が多すぎる、ということです。
Concrete technical checks and examples
- e-Stat provides an API (https://www.e-stat.go.jp/) — good reference for how a national stats API should behave: API keys, paged endpoints, JSON/CSV outputs.
- For PDF tables like the Digital田園交付金 KPI PDFs, use tabula-py or Camelot to extract, but this is brittle and brittle extraction is costly in maintenance.
Example: fetch e-Stat CSV (pseudo)
import requests
import pandas as pd
API_KEY = 'YOUR_ESTAT_KEY'
url = 'https://api.e-stat.go.jp/rest/3.0/app/getSimpleStatsData'
params = {'appId': API_KEY, 'statsDataId': '0003412310', 'lang': 'J'}
r = requests.get(url, params=params)
parse JSON or save CSV
Example: extract a table from PDF (if no CSV available)
import tabula
df_list = tabula.read_pdf('kpi_report.pdf', pages='all', multiple_tables=True)
do cleaning, standardize column names, store as CSV/Parquet
KPI vs actual — the policy angle
chisou.go.jp のチェック・アクションガイドラインやpref.yamaguchi.lg.jpの事業実績PDFを見てください。KPIが設定されている一方で、年度毎の時系列データや達成率の可視化がないため、政策効果の定量的な検証が難しいケースが多いです。目標と実績が別々のドキュメントに分かれていると、差分分析やトレンド分析が手作業になります。
Practical improvements (engineering roadmap)
Minimal viable API design (example)
- GET /api/v1/kpis?prefecture=Yamaguchi&year=2024
- Response: JSON array with fields: kpi_id, name, target_value, actual_value, unit, source_url, last_updated
- Provide OpenAPI and an interactive Swagger UI so civic hackers can explore instantly.
まとめ
- PDF-first publication slows reuse and auditing. 要するに、機械可読な公開が最優先だよ!
- e-Stat は良い見本。都道府県や省庁は同様のAPI/metadataパターンを採用すべき。
- 技術的改善はコスト小、効果は大。CSV/JSON + OpenAPI + CIで政策の透明性と再利用性を一気に上げられる。
おかむーから一言
テクノロジーで社会をアップデートするって言ってるんだから、データを人手から解放しようぜ!小さなAPI一本で、政策への信頼が変わるんです。"
Sources
- 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://bus.gov.ru/
- https://ja.wikipedia.org/wiki/%E3%83%87%E3%82%B8%E3%82%BF%E3%83%AB
- https://www.chisou.go.jp/sousei/pdf/r5_guideline-checkaction.pdf
- https://www.digital.go.jp/
- https://www.pref.yamaguchi.lg.jp/uploaded/attachment/160746.pdf
- https://e-words.jp/w/%E3%83%87%E3%82%B8%E3%82%BF%E3%83%AB.html
- https://www5.cao.go.jp/npc/
- https://www.intec.co.jp/column/smartcity-08.html
- https://ja.wikipedia.org/wiki/%E5%85%AC%E5%85%B1
- https://www.digital.go.jp/resources/data_case_study_private
- https://adtechmanagement.com/minnadepr-column/2025/11/02/koukyou-toha/
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.