Code-First Audit of Japan's Digital Public Data: APIs, PDFs, and Practical Fixes

IT Policy Proposals
Code-First Audit of Japan's Digital Public Data: APIs, PDFs, and Practical Fixes

どうも〜おかむーです! Today I'm digging into how Japan's national and local governments publish data — and what engineers actually need to make it useful.

  • Japan has made progress (Japan Dashboard, e-Stat, Digital Agency) but many datasets still live in PDFs or non-standard formats
  • Engineering fixes are straightforward: machine-readable exports, OpenAPI, DCAT metadata and versioned APIs
  • I'll show concrete code patterns, a schema suggestion, and operational recommendations to close policy-vs-implementation gaps

結論

The policy stack (Digital Agency, Japan Dashboard, local grants like the Digital Countryside program) is headed the right way, but implementation often stalls at machine-readability and API hygiene. 要するに: convert PDFs to CSV/JSON, publish OpenAPI specs, adopt DCAT-AP_JP metadata and unify municipal core-system interfaces.

Report

What I checked

I skimmed official resources: Digital Agency (https://www.digital.go.jp/), Japan Dashboard (https://www.digital.go.jp/resources/japandashboard), e-Stat dashboard (https://dashboard.e-stat.go.jp/), and local evaluation pages such as Sukagawa's project report. These are legit sources, but formats vary wildly.

PDF vs CSV: the recurring problem

これ見てくださいよ — many performance reports are PDFs (e.g. local strategy evaluations). PDFs are fine for humans but terrible for pipelines. Engineer-wise: PDFs break reproducibility, make time-series aggregation a nightmare, and prevent automated validation.

Practical remediation:

  • Short-term: publish CSV/JSON alongside PDFs
  • Mid-term: extract tables with tabula/pandas and publish normalized schemas
  • Long-term: require DCAT metadata and OpenAPI for every dataset endpoint

API & dashboard assessment

  • e-Stat offers APIs (good!) but coverage is uneven. Japan Dashboard centralizes visualization, but underlying dataset links sometimes point to static files.
  • Municipal core-system standardization (Digital Agency / Ministry of Internal Affairs pages) is a positive policy — but vendors and legacy systems create heterogeneity and vendor-lock risks.

Code examples

Extract PDF tables and normalize to CSV (Python sketch):

import tabula

import pandas as pd

extract all tables

tables = tabula.read_pdf('report.pdf', pages='all', multiple_tables=True)

df = pd.concat(tables)

df.to_csv('report.csv', index=False)

Fetch e-Stat JSON (pseudo):

curl "https://api.e-stat.go.jp/rest/3.0/app/json/getStatsData?appId=YOUR_APP_ID&statsDataId=0000020201" \

-o data.json

Normalize into a simple schema (example fields): id, prefecture_code, indicator_code, year, value, source_url

Policy target vs reality

Programs like the Digital Countryside grant (デジタル田園都市国家構想交付金) set outcomes for regional digital adoption, but many progress reports lack machine-readable KPIs, making verification hard. That gap undermines accountability.

Recommended roadmap

  • Mandate machine-readable exports (CSV/JSON) with DCAT-AP_JP metadata
  • Require an OpenAPI endpoint for each major dataset, with versioning and CORS
  • Provide reference ingestion code (Python/R) and sample schemas
  • Centralize dataset catalog on Japan Dashboard with links to live APIs, not only static files

まとめ

Japan's digital policy infrastructure exists, but the last mile is engineering: PDFs -> APIs, ad-hoc tables -> normalized schemas, and closed vendor systems -> standard interfaces. Do that and the data becomes programmable, auditable, and much more valuable.

おかむーから一言

I've built startups and shipped GovTech products — this is fixable with policy + a little engineering muscle. Push for CSV/JSON, OpenAPI, DCAT metadata, and you'll turn reports into real public goods.