The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
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[@]dogado.de.
jpmap follows the same basic workflow as
usmap: plot a map, get the map data, and transform your own
coordinates into the same coordinate system.
Install the development version from GitHub:
Boundary GeoPackages are large. Install the companion
jpmapdata package when you want ready-to-use boundaries, or
build local files with jpmap_build_data().
The main plotting function is plot_jpmap(). These two
calls draw empty maps without adding data, labels, colors, or other
options.
The data function is jp_map(), which returns an
sf object.
prefectures <- jp_map("prefecture")
okinawa_municipalities <- jp_map("municipality", include = "Okinawa")The transform function is jpmap_transform().
places <- tribble(
~place, ~lon, ~lat,
"Tokyo", 139.767, 35.681,
"Naha", 127.681, 26.212,
"Ogasawara", 142.191, 27.094
)
places |>
jpmap_transform(output_names = c("x", "y"))
#> # A tibble: 3 × 5
#> place lon lat x y
#> <chr> <dbl> <dbl> <dbl> <dbl>
#> 1 Tokyo 140. 35.7 205212. -199414.
#> 2 Naha 128. 26.2 -683245. 657517.
#> 3 Ogasawara 142. 27.1 537219. -578089.By default, the transform moves Okinawa and Ogasawara into visible
inset locations. Use inset = FALSE for a literal projected
map, or pass a character vector such as inset = "okinawa"
to transport only selected island groups. You can also use
okinawa = FALSE or ogasawara = FALSE.
plot_jpmap() draws inset boxes by default; set
inset_boxes = FALSE to remove them. Use xlim,
ylim, x_breaks, y_breaks,
x_labels, and y_labels when you want to
customize the displayed longitude/latitude frame.
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.
Health stats visible at Monitor.