# IN-MEMORY PROJECT
require(rangeMapper)
wrens = read_wrens()
con = rmap_connect()
rmap_add_ranges(con, wrens, 'sci_name')
rmap_prepare(con, 'hex', cellsize=500)
dbDisconnect(con)
if (FALSE) {
# PROJECT PREPARED IN PARALLEL
require(future)
require(progressr)
plan(multisession, workers = 2)
handlers(global = TRUE)
Path = tempfile()
con = rmap_connect(Path)
rmap_add_ranges(con, wrens, 'sci_name')
rmap_prepare(con, 'hex', cellsize=200, chunksize = 0.1)
dbDisconnect(con)
plan(sequential)
}
Run the code above in your browser using DataLab