Description Usage Arguments Value Examples
Get all hexagons containing [lat, lng] points
1 2 3 4 5 6 7 8 9 10 11 12 13 |
coords |
numeric vector, matrix or data.frame with [lat, lng] pairs;
object of class |
res |
resolution of hexagons to return; number between 0 and 15 |
H3 indexes; character vector
1 2 3 4 5 6 7 8 9 10 11 | # numeric
coords <- c(37.3615593, -122.0553238)
geo_to_h3(coords, 7)
# matrix
geo_to_h3(road_safety_greater_manchester[1:10, ], res = 5)
# sf
points <- as.data.frame(greater_manchester) %>%
sf::st_as_sf(coords = c("lng", "lat"), crs = 4326)
geo_to_h3(points[1:5, ], res = 12)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.