
Retrieve Japan Map Data
jp_map.RdReads Japan administrative boundary data and returns an sf object.
Arguments
- regions
Boundary level: prefectures or municipalities.
- include
Regions to include by code, English name, or Japanese name.
- exclude
Regions to exclude by code, English name, or Japanese name.
- data_year
Boundary data year. The newest appropriate available file is used by default. For example, national prefecture maps prefer a national file, while one-prefecture municipal requests can use a matching prefecture file.
- inset
Inset behavior. Use
TRUEto move both Okinawa and Ogasawara,FALSEfor no movement, or a character vector containing"okinawa"and/or"ogasawara"to move selected island groups.- okinawa
Whether Okinawa should be moved when
insetincludes it.- ogasawara
Whether Ogasawara should be moved when
insetincludes it.- territorial_disputes
Whether to include disputed-territory island/reef shapes. Use
FALSEto exclude them, or a character vector containing one or more of"northern_territories","okinotorishima","senkaku", and"takeshima".- data_dir
Optional directory containing
jpmap_boundaries_YYYY.gpkg.
Examples
# \donttest{
if (nrow(available_jpmap_data()) > 0) {
jp_map("prefectures")
jp_map("prefectures", okinawa = FALSE)
jp_map("prefectures", territorial_disputes = FALSE)
jp_map("municipalities", include = "Okinawa")
jp_map("prefecture")
jp_map("municipality", include = "Okinawa")
}
# }