Type Package Title Utilities for Japanese Mesh Code Version 1.0.1 Package jpmesh December 4, 2017 Maintainer Shinya Uryu <suika1127@gmail.com> Helpful functions for using mesh code (80km to 125m) data in Japan. Visualize mesh code using 'ggplot2' and 'leaflet', etc. Depends R (>= 3.1.2) URL https://github.com/uribo/jpmesh BugReports https://github.com/uribo/jpmesh/issues Imports dplyr (>= 0.7.4), leaflet (>= 1.1.0), miniui (>= 0.1.1), purrr (>= 0.2.4), rlang (>= 0.1.4), readr (>= 1.1.1), sf (>= 0.5-5), shiny (>= 1.0.5), tibble (>= 1.3.4), tidyr (>= 0.7.2) Suggests devtools (>= 1.13.4), knitr, testthat (>= 1.0.2), stringr (>= 1.2.0) VignetteBuilder knitr License MIT + file LICENSE LazyData true RoxygenNote 6.0.1 NeedsCompilation no Author Shinya Uryu [aut, cre] (0000-0002-0493-6186) Repository CRAN Date/Publication 2017-12-04 04:07:26 UTC R topics documented: administration_mesh.................................... 2 coords_to_mesh....................................... 2 eval_jp_boundary...................................... 3 export_mesh......................................... 4 1
2 coords_to_mesh find_neighbor_mesh.................................... 4 fine_separate........................................ 5 jpnrect............................................ 5 meshcode_set........................................ 6 mesh_to_coords....................................... 6 mesh_viewer........................................ 7 sf_jpmesh.......................................... 7 Index 9 administration_mesh Extract administration mesh Extract administration mesh administration_mesh(code, type = c("prefecture")) code type administration code administration type. Should be one of "prefecture" or "city". administration_mesh(code = c(35201)) administration_mesh(code = c(35), type = "prefecture") administration_mesh(code = c(33, 34), type = "prefecture") coords_to_mesh Convert from coordinate to mesh code From coordinate to mesh codes. coords_to_mesh(longitude, latitude, mesh_size = "1km",...)
eval_jp_boundary 3 Details Value longitude latitude mesh_size longitude (double) latitude (double) mesh type. From 80km to 125m http://takenaka-akio.org/etc/j_map/index.html mesh code (default 3rd meshcode) Author(s) Akio Takenaka coords_to_mesh(141.3468, 43.06462, mesh_size = "10km") coords_to_mesh(139.6917, 35.68949, mesh_size = "250m") coords_to_mesh(139.71475, 35.70078) eval_jp_boundary Check include mesh areas It roughly judges whether the given coordinates are within the mesh area. eval_jp_boundary(longitude = NULL, latitude = NULL,...) longitude latitude longitude (double) latitude (double) eval_jp_boundary(139.71471056, 35.70128943)
4 find_neighbor_mesh export_mesh Export meshcode to geometry Convert and export meshcode area to sf polygon. export_mesh(meshcode) meshcode mesh code Value sf object export_mesh(6441427712) find_neighbor_mesh Find out neighborhood meshes collection Find out neighborhood meshes collection find_neighbor_mesh(mesh = NULL, contains = TRUE) mesh contains meshcode (under the 1km mesh size) logical. contains input meshcode find_neighbor_mesh(53394501) find_neighbor_mesh(533945011) find_neighbor_mesh(533945011, contains = FALSE)
fine_separate 5 fine_separate Separate more fine mesh order Return contains fine mesh codes fine_separate(mesh = NULL,...) Value mesh mesh code for paste character vector fine_separate(52350400) fine_separate(52350400) fine_separate(52350400) jpnrect Simple displaed as rectangel for Japan (fortified) Rectangle Japanese prefectures positions. jpnrect Format A data frame with 235 rows 11 variables: long lat order hole
6 mesh_to_coords piece id group mesh_code latitude longitude abb_name plot(jpnrect["abb_name"]) meshcode_set Export 80km meshcode vectors Unique 176 meshcodes. The output code may contain values not found in the actual mesh code. meshcode_set(mesh_size = c("80km", "10km", "1km")) mesh_size Export mesh size from 80km to 1km. mesh_to_coords Get from mesh code to latitude and longitude mesh centroid mesh_to_coords(meshcode,...) meshcode numeric. mesh code
mesh_viewer 7 Details http://takenaka-akio.org/etc/j_map/index.html Author(s) Akio Takenaka mesh_to_coords(64414277) mesh_viewer interactive meshcode check Shiny gadgets for jpmesh. mesh_viewer(...) mesh_viewer() sf_jpmesh 1:200,000 Scale Maps Name with Meshcode of Japan. Information for the 1:200,000 Scale Maps. sf_jpmesh
8 sf_jpmesh Format A data frame with 175 rows 9 variables: meshcode: 80km meshcode name: names for map name_roman: names for map (roman) lng_center: centroid coordiates of mesh lat_center: centroid coordiates of mesh lng_error: mesh area lat_error: mesh area type: evalueate value to mesh plot(sf_jpmesh["name_roman"])
Index Topic datasets jpnrect, 5 sf_jpmesh, 7 administration_mesh, 2 coords_to_mesh, 2 eval_jp_boundary, 3 export_mesh, 4 find_neighbor_mesh, 4 fine_separate, 5 jpnrect, 5 mesh_to_coords, 6 mesh_viewer, 7 meshcode_set, 6 sf_jpmesh, 7 9