Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Miss-match: find_neighbor_mesh() assigned specific meshcode #13

Closed
uribo opened this issue Feb 15, 2018 · 0 comments
Closed

Miss-match: find_neighbor_mesh() assigned specific meshcode #13

uribo opened this issue Feb 15, 2018 · 0 comments
Labels

Comments

@uribo
Copy link
Owner

uribo commented Feb 15, 2018

In some cases, the value to return is incorrect.

ex)

library(magrittr)
library(jpmesh)
packageVersion("jpmesh")
#> [1] '1.0.1'
library(leaflet)

wrong <- "37250395"

find_neighbor_mesh(wrong)
#> [1] 37250384 37250385 37250386 37250394 37250395 37250396 37250404 37250405
#> [9] 37250406

df_check <- data.frame(
  meshcode = find_neighbor_mesh(wrong),
  stringsAsFactors = FALSE) %>%
  dplyr::mutate(geometry = purrr::pmap(., ~ export_mesh(meshcode = .x) %>%
                                         sf::st_as_text())) %>%
  tidyr::unnest() %>%
  dplyr::mutate(geometry = sf::st_as_sfc(geometry)) %>%
  sf::st_sf()

Created on 2018-02-15 by the reprex package (v0.2.0).

leaflet::leaflet() %>%
  leaflet::addTiles() %>%
  leaflet::addPolygons(data = df_check, popup = ~as.character(meshcode))

image

@uribo uribo added the bug 💣 label Feb 15, 2018
@uribo uribo closed this as completed in 1bfe3d4 Feb 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant