Code-Speaks Manifesto: Inspecting Japan's Public CSVs and What GovTech Should Do Next

どうも〜おかむーです! Today I'm doing a bit of civic hacking meets policy critique — under the banner "Codeで語るマニフェスト". エンジニア的に言うと、公開データが政策の正否を検証するためのテストケースなんですよね。これ見てくださいよ、今回扱うのは以下の公開CSV群です:
- NOTICE: https://notice.go.jp/docs/status_notice.csv
- Ministry of Environment (Ibaraki): https://www.env.go.jp/content/900398071.csv (463KB)
- Domestic migration list 2011: https://www.inpit.go.jp/content/100869372.csv
- Rescue facilities: https://www.mhlw.go.jp/content/001682075.csv (8KB)
- Cabinet/Local data (national CSV): https://www.soumu.go.jp/main_content/000323625.csv (104KB)
- 3-line summary
- API化やスキーマ検証で政策の実績を追跡可能にするべき。
- 実践: encoding detection, schema validation, datapackage化、そしてAPI一本化を提案。
結論
公開CSVは素晴らしい入り口だけど、現状だと政策評価に使うには不十分。要するに、データパイプラインの堅牢化(エンコード/スキーマ/メタデータ)と、API化による安定的なアクセスを最低限やるべき、ということです。
レポート本文
What I inspected
I looked at the CSV links above. Good news: ministries are exporting CSVs instead of PDFs — huge win. Bad news: inconsistencies kill automation.
問題点の例:
- Encoding ambiguity: some files might be Shift_JIS, others UTF-8. エンジニア的に言うと、まずchardetでdetectしないとパイプライン死にます。
- Missing schema: no datapackage.json, no column descriptions, no units. 要するに、どの列がIDでどれが数値か分からない。
- Update frequency unclear: no updated_at metadata, so you can't know staleness.
- No stable API endpoint: direct CSV links break on site reorganizations.
Quick technical checks (code snippets)
Here's a minimal Python pattern to robustly ingest these CSVs:
import requests
import chardet
import pandas as pd
url = 'https://notice.go.jp/docs/status_notice.csv'
r = requests.get(url)
d = chardet.detect(r.content)
text = r.content.decode(d['encoding'] or 'utf-8', errors='replace')
from io import StringIO
df = pd.read_csv(StringIO(text))
print(df.head())
次に、schemaを自動検証する例(panderaを想定):
import pandera as pa
schema = pa.DataFrameSchema({
'id': pa.Column(pa.Int),
'date': pa.Column(pa.DateTime),
'count': pa.Column(pa.Int, nullable=True),
})
schema.validate(df)
Policy vs data — where the gap is
Many policies declare numeric targets (e.g., disaster shelter capacity, migration balance, administrative notices resolved). CSVs exist, but:
- No mapping from CSV rows to policy KPIs (no policy_id column).
- No historical time series standardized across departments.
Practical improvements (tech roadmap)
Example: minimal OpenAPI sketch
openapi: '3.0.0'
paths:
/notices:
get:
parameters:
- in: query
name: date_from
responses:
'200':
content:
application/json:
schema: {...}
まとめ
CSVの公開は前進だけど、engineer目線だとまだ中間テーブルレベル。要するに、データを"信頼できるAPI + スキーマ付きアセット"に昇格させる必要があるんですよね。これができれば、政策の実績と目標のギャップを自動で検出できるし、自治体横断のダッシュボードも作れる。
おかむーから一言
テクノロジーで行政をアップデートするのは手間だけど、やる価値は無限大。まずは小さなデータパッケージから始めよう!
Sources
- https://notice.go.jp/docs/status_notice.csv
- https://www.env.go.jp/content/900398071.csv
- https://www.inpit.go.jp/content/100869372.csv
- https://www.mhlw.go.jp/content/001682075.csv
- https://www.soumu.go.jp/main_content/000323625.csv
- https://www.intec.co.jp/column/smartcity-08.html
- https://www.digital.go.jp/resources/data_case_study_local
- https://datafor.jp/opendata2025/
- https://www.digital.go.jp/resources/data_case_study_private
- https://www.stat.go.jp/dstart/case/download.html
- https://www.zhihu.com/question/290714454
- https://metidx-gov.note.jp/n/n9468573c213b
- https://www.zhihu.com/question/6430289390
- https://ai-government-portal.com/%E5%85%AC%E5%8B%99%E5%93%A1%E3%81%AE%E6%96%B0%E3%81%97%E3%81%84%E6%8C%91%E6%88%A6%E3%80%8C%E8%A1%8C%E6%94%BFux%E6%94%B9%E5%96%84%E6%A5%AD%E5%8B%99%E5%A7%94%E8%A8%97%E3%80%8D%E5%AE%8C%E5%85%A8%E3%82%AC/
- 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.