jpmap separates functionality from large boundary files.
The package provides the plotting, joining, transformation, and download
helpers. Boundary GeoPackages can come from the companion
jpmapdata package or from local files you build from
official public sources.
jpmap checks:
jpmapdata
package;jpmap_data_dir();data_dir when you pass one.You can see the available GeoPackage files with:
library(jpmap)
available <- available_jpmap_data()[c("year", "pref_code", "prefecture", "source")]
row.names(available) <- NULL
available
#> year pref_code prefecture source
#> 1 2021 <NA> <NA> jpmapdata
#> 2 2024 47 Okinawa jpmapdataThe website intentionally does not print the user-specific data
directory. Run jpmap_data_dir(create = FALSE) locally when
you need to inspect where your own generated boundary files are
saved.
Municipality maps are based on Japan’s MLIT National Land Numerical Information N03 administrative area data:
Build one prefecture when you only need one prefecture:
Build the national file only when you need all municipalities:
jpmap_build_data() converts the source archive to a
GeoPackage with two layers, prefectures and
municipalities.
Disputed-territory shapes are politically sensitive because inclusion and exclusion are both meaningful map choices. Users can exclude them explicitly when that is the right display choice:
You can also include selected areas:
plot_jpmap("prefecture", territorial_disputes = "senkaku")
plot_jpmap("prefecture", territorial_disputes = c("senkaku", "takeshima"))The disputed-territory layer is a cartographic display layer. It is not a legal statement about sovereignty. The layer exists so users can make an explicit and documented display choice rather than relying on inconsistent small-island and reef handling across data sources.
For a reproducible project, record:
jpmap package version;jpmapdata, local files, or
a custom data directory;territorial_disputes was FALSE,
TRUE, or a selected character vector;For example: