Code-Telling Manifesto: How Japan's Public Data Stacks Up (and How to Fix It)

どうも〜おかむーです! Today I'm digging into how Japanese government and local open data behave from an engineering standpoint — the "Code-Telling Manifesto" take. エンジニア的に言うと、政策はコードとデータでも語るべきなんですよね。
- Government publishes lots of CSVs and PDFs, but formats and encodings vary a lot
- Machine-readability rules are being set (CAS/Digital Agency), yet catalogs and APIs remain inconsistent
- Practical fixes: UTF-8/CSV canonicalization, OpenAPI, DCAT metadata, CI for data quality — here's how
結論
Public-sector data is moving in the right direction (policy documents on machine readability exist), but the current ecosystem is a patchwork: inconsistent encodings, mixed CSV/PDF publishing, and sparse APIs make automation fragile. 要するに、技術的な標準化とデベロッパー向け UX を優先すれば、政策の透明性と二次利用がぐっと上がります。
Report: what I checked and what it shows
What I looked at (examples from official sources)
- notice.go.jp/status_notice.csv — an example CSV endpoint served directly (good!)
- digital.go.jp resource CSVs (survey answers, hospital list) — real open files but encoding/garbage can appear
- env.go.jp CSV (Ibaraki) and Tokyo's open data catalog — visible catalogs and datasets
- Policy docs: cas.go.jp PDFs and Digital Agency materials on machine readability and AI-Ready goals
これ見てくださいよ:official CSV links exist, but some files contain mojibake/encodings (see digital.go.jp CSV snippet) or inconsistent column names. That makes automated pipelines brittle.
Technical problems I observed
- Encoding variety: many files are Shift_JIS/CP932 or have BOMs. For automation, UTF-8 should be the default.
- Schema drift: same concept (e.g., hospital lists) uses different column sets and naming conventions across jurisdictions.
- PDFs vs CSVs: some statistics are published as PDFs (or CSVs embedded in PDFs), which hinders parsing.
- Lack of machine-readable metadata: catalogs exist (Tokyo, prefectures), but not all expose DCAT or JSON-LD metadata consistently.
- API gaps: raw CSV links are helpful, but a lot of datasets lack a stable REST/GraphQL API with pagination, schema discovery, and formats.
Concrete code sketches (how I'd ingest these reliably)
import pandas as pd
url = 'https://notice.go.jp/docs/status_notice.csv'
robust read: try utf-8 then fallback to cp932
for enc in ['utf-8','cp932','shift_jis']:
try:
df = pd.read_csv(url, encoding=enc)
break
except Exception:
continue
normalize columns
df.columns = df.columns.str.strip().str.lower().str.replace(' ', '_')
要するに、エンジニアならこのフォールバックと正規化は常套手段ってことです。
Policy vs reality
Government materials (CAS/Digital Agency) set goals toward "machine-readable" administrative data and AI-Ready timelines. That's great — but operationally, municipal publishing cycles, legacy systems, and Excel-first workflows mean adoption is uneven. Numbers are there, but accessibility and trustworthiness for automated use lag.
Practical improvement plan (engineering-first)
Benefits: downstream apps, journalists, and researchers stop writing brittle scrapers and can build reproducible analyses.
まとめ
- Japan has the raw ingredients: catalogs, CSV links, and policy momentum
- The missing piece is developer ergonomics: consistent encodings, schemas, and APIs
- A modest engineering push (schemas + CI + OpenAPI + metadata) delivers outsized gains for transparency and reuse
おかむーから一言
I'm a founder and full-stack dev — tech scales transparency. Small changes (UTF-8, a schema, a CI test) unlock huge social value. Let's make public data truly programmable!
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/ea851c04-54d0-43ab-b352-4cb537ee5347/20210609_resources_survey_answers_04.csv
- https://www.env.go.jp/content/900398071.csv
- https://www.digital.go.jp/assets/contents/node/basic_page/field_ref_resources/0066e8a8-6734-44ab-a9a9-8e09ba9cb508/xxxxxx_hospital.csv
- https://www.cas.go.jp/jp/seisaku/digital_gyozaikaikaku/data8/data8_siryou1.pdf
- https://www.zhihu.com/question/290714454
- https://www.cas.go.jp/jp/seisaku/digital_gyozaikaikaku/kakusyoDX4/kakusyoDX4.html
- https://www.cas.go.jp/jp/seisaku/digital_gyozaikaikaku/data8/data8_siryou2.pdf
- https://www.zhihu.com/question/6430289390
- https://catalog.data.metro.tokyo.lg.jp/dataset
- https://portal.data.metro.tokyo.lg.jp/
- https://opendata.pref.tokushima.lg.jp/dataset/5036.html
- https://www.harp.lg.jp/opendata/dataset/79.html
- https://opendata.pref.aomori.lg.jp/dataset/1480.html
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.