The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.
jpmap uses GeoPackage files with two layers:
prefecturesmunicipalitiesReady-to-use boundary files can be supplied by the companion
jpmapdata package. You can also build your own GeoPackage
files from MLIT N03 administrative area data. The 2024 MLIT N03 files
describe administrative boundaries as of January 1, 2024.
By default, jpmap_build_data() saves converted
GeoPackage files in the package data directory returned by
jpmap_data_dir().
library(jpmap)
# Run this locally to see your user-specific data directory.
jpmap_data_dir(create = FALSE)The exact value is different on each computer, so the website does
not print a live path. You do not need to create this directory by hand.
jpmap_build_data() creates it when needed.
For most municipal examples, start with one prefecture. This
downloads a smaller official MLIT N03 archive, converts it to a
GeoPackage, and saves it in jpmap_data_dir().
The generated file is named with the prefecture code:
For Okinawa, the companion data package can provide the 2024 file:
Build nationwide municipal data only when you need all municipalities. The official 2024 national source archive is about 583 MB, and the converted GeoPackage is also large.
The generated national file is named:
The source is MLIT National Land Numerical Information N03 administrative area data:
The filename pattern is N03-YYYY0101_GML.zip for
national data and N03-YYYY0101_PP_GML.zip for
one-prefecture data, where PP is a two-digit prefecture
code.
If you want to keep boundary data in a project folder instead of the
default user data directory, pass destdir.
dir.create("jpmap-data", showWarnings = FALSE)
jpmap_build_data(year = 2024, prefecture = "Ehime", destdir = "jpmap-data")Use the same folder later with data_dir.
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.