Code-Talking Manifesto: Reading Government Data as Engineers

どうも〜おかむーです! Hi — I’m Okamu, and today we’re going to read policy through the lens developers love: code, schemas, and automation. Engineer-wise, public data should be predictable, machine-readable, and instrumentable — let’s see how current Japanese government CSVs stack up and what to do about it.
- This piece inspects publicly listed CSV endpoints (notice.go.jp, env.go.jp, inpit.go.jp, mhlw.go.jp, soumu.go.jp).
- Short technical audit: encoding, schema, metadata, update patterns, API gaps.
- Concrete developer-friendly fixes: schema, CI checks, lightweight API, and adoption paths.
結論
Public data is getting there (CSV links exist!), but engineering practices are inconsistent: encodings differ, schemas are undocumented, updates lack provenance, and APIs are rare. 要するに、データ自体はあるけど“使える状態”になっていない。改善は小さな工程(schema, license, CI, simple REST/CSV endpoints)で十分です。
What I looked at
These are the endpoints surfaced in search results:
- https://notice.go.jp/docs/status_notice.csv (NOTICE status CSV)
- https://www.env.go.jp/content/900398071.csv (Ministry of Environment — Ibaraki CSV)
- https://www.inpit.go.jp/content/100869372.csv (domestic migration data 2011)
- https://www.mhlw.go.jp/content/001682075.csv (shelter facilities data)
- https://www.soumu.go.jp/main_content/000323625.csv (national dataset list)
I didn’t need to download heavy PDFs to see the pattern: gov domains publish CSVs directly (nice!), but often without explicit machine-readable metadata (JSON Schema, DataPackage, or OpenAPI) and without clear API endpoints.
Quick technical audit (common issues)
- Encoding: many gov CSVs historically use Shift_JIS / CP932. If the file is not UTF-8, web apps and downstream tools choke. Engineer-wise, normalize to UTF-8.
- Schema/columns: No embedded schema or field types. Consumers guess column types, date formats, and ID semantics. 要するに、傾向として "guesswork" が増える。
- Metadata: missing license, update timestamps, provenance. You need license+updated_at for legal and operational use.
- Stability & endpoints: CSV file URLs can change between releases. No versioning or API that supports stable identifiers and pagination.
- Geodata: location fields often free-text (prefecture/city). For maps, GeoJSON and canonical codes (JIS X 0401/0402) are better.
Example: how an engineer would consume one of these CSVs
This is the kind of snippet I run quickly to validate encoding and preview columns (bash + Python):
# quick curl + encoding check
curl -sS https://notice.go.jp/docs/status_notice.csv -o tmp.csv
file tmp.csv
head -n 5 tmp.csv | nkf -g
# pandas preview and automatic type inference
import pandas as pd
df = pd.read_csv('tmp.csv', encoding='cp932') # try cp932 then utf-8
print(df.head())
print(df.dtypes)
Engineer note: if you need to try multiple encodings programmatically, use chardet or cchardet to detect, then normalize to UTF-8 and store canonical copies.
Concrete improvements (low-cost, high-impact)
- Example datapackage.json minimal fields: name, title, resources[ { path, schema: { fields: [...] } } ]
- Implement as static hosting + lambda or nginx rewrite. No heavy infra required.
- On push, run CSVLint/agate checks: column count stable, date parseable, no mixed types.
Example JSON Schema fragment (illustrative)
{
"title": "notice_status",
"type": "object",
"properties": {
"notice_id": { "type": "string" },
"title": { "type": "string" },
"issued_at": { "type": "string", "format": "date-time" },
"pref_code": { "type": "string" }
},
"required": ["notice_id","issued_at"]
}
要するに、Schemaがあれば取り回しが劇的に楽になりますよね。
Policy vs Data: measuring gaps
Many policies set targets (e.g., evacuation capacity, migration numbers). With well-structured time-series CSVs + stable IDs you can programmatically compute: progress to target, trends, and anomalies. Right now, the friction is data hygiene: inconsistent timestamps, missing unique IDs, and undocumented changes make reproducible evaluation hard.
Practical check to compute trend completeness (pseudo-query):
- Ensure record has: id, date (ISO), metric
- GROUP BY date ORDER BY date -> percent_nulls
Roadmap for adoption (how local governments can ship good data fast)
参考 — why these specific URLs matter
- notice.go.jp status CSV: operational notifications are high value — machine-readable status reduces phone calls and duplication.
- env.go.jp and mhlw.gov CSVs: environmental and shelter datasets are prime candidates for GIS/real-time dashboards.
- soumu.go.jp national CSV index: shows willingness to publish, so improving engineering practices unlocks broad reuse.
まとめ
CSV endpoints exist! That’s already great. But to be truly reusable you need: UTF-8, JSON Schema / DataPackage, license & provenance metadata, stable endpoints (or API), and CI validation. エンジニア的に言うと、これはAPI一本で解決する話でもありますが、その前に“データの契約(schema)”を結ぶのが最優先。
おかむーから一言
I built stuff on tiny budgets and shipping a simple schema+CI beats complex portals every time. Let’s get government data to the point where hackers and analysts can ship useful tools without guessing what a column means — that’s how policy becomes measurable and accountable!
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://ja.wikipedia.org/wiki/%E5%85%AC%E5%85%B1
- https://www.intec.co.jp/column/smartcity-08.html
- https://kotobank.jp/word/%E5%85%AC%E5%85%B1-494676
- https://www.digital.go.jp/resources/data_case_study_private
- https://www.manawin.jp/languagegap/general/koukyou-kouteki/
- 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.