日本語のREADMEはこちらです: README.ja.md
An open dataset of all local governments in Japan, including prefectures, cities, wards, towns, and villages.
- Number of Cities in Japan
- List of Prefecture and City Websites in Japan
- Map of City Halls in Japan
- Map of Prefectures in Japan
The data is available in both CSV and JSON formats, hosted via GitHub Pages for easy use in web applications.
- CSV: https://code4fukui.github.io/localgovjp/localgovjp-utf8.csv
- JSON: https://code4fukui.github.io/localgovjp/localgovjp.json
- CSV: https://code4fukui.github.io/localgovjp/prefjp-utf8.csv
- JSON: https://code4fukui.github.io/localgovjp/prefjp.json
| Field | Description |
|---|---|
pid |
Prefecture ID |
pref |
Prefecture Name |
cid |
City ID |
city |
City Name |
citykana |
City Name (Kana) |
lat |
Latitude |
lng |
Longitude |
url |
City Website URL |
phrase |
Catchphrase |
lgcode |
Local Government Code |
| Field | Description |
|---|---|
pid |
Prefecture ID |
pref |
Prefecture Name |
prefkana |
Prefecture Name (Kana) |
pref_en |
Prefecture Name (English) |
url |
Prefecture Website URL |
lgcode |
Local Government Code |
ISO3166-2 |
ISO 3166-2 Code (e.g., JP-01) |
This project uses Deno for data processing and updates.
- Generate an intermediate file for review:
deno run -A deno/chk-localgov.js - Manually check for errors and edit the generated
deno/c-localgovjp-utf8.csv. - Generate the final data files (
.csv,.json,.js):deno run -A deno/make-localgov.js - Sign the data using OpendataWithTrust (requires
PRIKEYin.env):deno run -A deno/sign-localgov.js
- Generate an intermediate file for review by running the appropriate check script.
- Manually check for errors and edit the generated
deno/c-prefjp-utf8.csv. - Generate the final data files (
.csv,.json,.js) by adaptingdeno/make.js. - Sign the data using OpendataWithTrust (requires
PRIKEYin.env):deno run -A deno/sign-pref.js
You can verify the integrity of the data files using OpendataWithTrust.
deno run --allow-read --allow-net https://code4fukui.github.io/opendata-with-trust/verifyTrust.js localgovjp-utf8.csv
deno run --allow-read --allow-net https://code4fukui.github.io/opendata-with-trust/verifyTrust.js localgovjp.json
deno run --allow-read --allow-net https://code4fukui.github.io/opendata-with-trust/verifyTrust.js prefjp-utf8.csv
deno run --allow-read --allow-net https://code4fukui.github.io/opendata-with-trust/verifyTrust.js prefjp.json- Geospatial Information Authority of Japan
- [Local Government