Code-First Manifest: Evaluating Japan's Government Data from a Dev's POV

どうも〜おかむーです!今日はちょっとエンジニアっぽい話をしますよ〜
- Government publishes lots of CSVs (notice.go.jp, digital.go.jp, prefectures) but formats vary a ton
- Machine-readability rules exist at cabinet level, yet practical gaps remain (PDFs, encoding, schema)
- I'll show quick technical checks and pragmatic fixes so datasets become actually reusable
結論
政府は機械可読性のルールを決めて前に進んでいるけど、現場ではまだCSVのエンコーディング崩れ、欠損、メタデータ不足、API不在が多い。エンジニア的に言うと「API一本で解決する話なんですよね」。要するに、政策はあるけど実装エコシステムが追いついていない。
Report: what I looked at and what it tells us
What I inspected
- notice.go.jp status CSV (https://notice.go.jp/docs/status_notice.csv) — plainly a CSV endpoint, nice!
- Cabinet Office CSVs (https://www5.cao.go.jp/…/d1-1-4.csv) — time series like new car sales
- digital.go.jp hospital CSV (xxxxxx_hospital.csv) — includes lat/lon and structured columns
- Meeting notes on machine-readable rules (digital.go.jp docs) showing policy direction (ref: デジタル行財政改革会議)
これ見てくださいよ: some CSVs are clean, others show BOM/garbled text or embedded PDFs referenced instead of raw data (see search result with mojibake). That means downstream ETL breaks.
Practical data-quality and engineering checks
- Content-Type and encoding: use a HEAD or curl to inspect headers
curl -I https://notice.go.jp/docs/status_notice.csv
- Python quick check (encoding + schema validation):
import pandas as pd
df = pd.read_csv('status_notice.csv', encoding='utf-8-sig')
print(df.columns)
Quick lat/lon validity
if 'lat' in df.columns:
invalid = df[~df['lat'].between(-90,90)]
要するに、UTF-8 BOM や Shift_JIS の混在、日付フォーマット不統一、NULL表現の揺れがETLでの最大の敵です。
Policy vs Reality
- Policy: cabinet documents now set machine-readable rules and aim to reduce data-shaping costs (see digital.go.jp meeting docs)
- Reality: many municipal datasets still live as PDFs or CSVs without schema/metadata. That raises friction for reuse and verification of policy metrics (e.g., comparing target numbers to time-series CSVs requires clean, consistent formats).
Concrete improvement proposals
- Mandatory machine-readable primary publishing: CSV/JSON/GeoJSON + persistent URLs
- Provide JSON Schema / CSVW metadata alongside each dataset (makes validation automatic)
- Offer a minimal Data API (OpenAPI) per portal for search & query
- CI for datasets: automated checks for encoding, required fields, lat/lon ranges, and schema drift
- Use data-packages or CKAN with CSVW to host schemas and provenance
技術的注意点とサンプルワークフロー
utf-8-sig fallbackTools: csvkit, pandas, frictionless-py, goodtables, GitHub Actions for dataset CI.
まとめ
政府は機械可読化の政策を打っているけど、実務レベルではまだデータ品質・メタデータ不足・API欠如といったエンジニアのツラさが残る。簡単な自動検証パイプラインとスキーマ公開で再利用性は劇的に上がる。正直、ここは改善の余地ありまくりだと思ってます!
おかむーから一言
テクノロジーで行政をアップデートするのはまだ始まり。コードで語るマニフェスト、実装まで寄り添っていきますよ!
Sources
- https://notice.go.jp/docs/status_notice.csv
- https://www5.cao.go.jp/j-j/wp/wp-je24/csv/d1-1-4.csv
- https://www.digital.go.jp/assets/contents/node/basic_page/field_ref_resources/0066e8a8-6734-44ab-a9a9-8e09ba9cb508/xxxxxx_hospital.csv
- https://www.env.go.jp/content/900398071.csv
- https://www.digital.go.jp/assets/contents/node/basic_page/field_ref_resources/ea851c04-54d0-43ab-b352-4cb537ee5347/20210609_resources_survey_answers_04.csv
- https://www.zhihu.com/question/290714454
- https://www.cas.go.jp/jp/seisaku/digital_gyozaikaikaku/kakusyoDX4/kakusyoDX4.html
- https://www.zhihu.com/question/6430289390
- https://www.digital.go.jp/assets/contents/node/basic_page/field_ref_resources/256dcba6-b936-4031-b88d-3abb27e27f9b/7c809f2f/20260331_meeting_executive_outline_05.pdf
- https://www.zhihu.com/question/38923279
- https://catalog.data.metro.tokyo.lg.jp/dataset
- https://portal.data.metro.tokyo.lg.jp/
- https://opendata.pref.saitama.lg.jp/datasets
- https://opendata.pref.saitama.lg.jp/
- https://www.city.niigata.lg.jp/shisei/seisaku/it/open-data/
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.