sandbox/benchmark-vectorize.R

library(microbenchmark)
library(geojsonio)
library(h3forr)

h3_index <- geo_to_h3_map(us_cities[1:50, ], "lat", "long")

microbenchmark(
  lapply(h3_index, h3_to_geo_boundary),
  purrr::map(h3_index, h3_to_geo_boundary),
  h3_to_geo_boundary(h3_index)
)
crazycapivara/h3forr documentation built on Dec. 6, 2020, 5:21 a.m.