Skip to content

chopin

Spatial Parallel Computing by Hierarchical Data Partitioning

v0.9.9-5 · Apr 3, 2026 · MIT + file LICENSE

Description

Geospatial data computation is parallelized by grid, hierarchy, or raster files. Based on 'future' (Bengtsson, 2024 <doi:10.32614/CRAN.package.future>) and 'mirai' (Gao et al., 2025 <doi:10.32614/CRAN.package.mirai>) parallel back-ends, 'terra' (Hijmans et al., 2025 <doi:10.32614/CRAN.package.terra>) and 'sf' (Pebesma et al., 2024 <doi:10.32614/CRAN.package.sf>) functions as well as convenience functions in the package can be distributed over multiple threads. The simplest way of parallelizing generic geospatial computation is to start from par_pad_*() functions to par_grid(), par_hierarchy(), or par_multirasters() functions. Virtually any functions accepting classes in 'terra' or 'sf' packages can be used in the three parallelization functions. A common raster-vector overlay operation is provided as a function extract_at(), which uses 'exactextractr' (Baston, 2023 <doi:10.32614/CRAN.package.exactextractr>), with options for kernel weights for summarizing raster values at vector geometries. Other convenience functions for vector-vector operations including simple areal interpolation (summarize_aw()) and summation of exponentially decaying weights (summarize_sedc()) are also provided.

Downloads

620

Last 30 days

6299th

1.7K

Last 90 days

4.1K

Last year

Trend: +9.4% (30d vs prior 30d)

CRAN Check Status

1 ERROR
3 NOTE
10 OK
Show all 14 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-macos-arm64 OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 NOTE
r-oldrel-macos-x86_64 NOTE
r-oldrel-windows-x86_64 NOTE
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 ERROR
Check details (4 non-OK)
NOTE r-oldrel-macos-arm64

installed package size

installed size is  6.9Mb
  sub-directories of 1Mb or more:
    data      3.0Mb
    extdata   2.9Mb
NOTE r-oldrel-macos-x86_64

installed package size

installed size is  6.9Mb
  sub-directories of 1Mb or more:
    data      3.0Mb
    extdata   2.9Mb
NOTE r-oldrel-windows-x86_64

installed package size

installed size is  5.9Mb
  sub-directories of 1Mb or more:
    data      2.0Mb
    extdata   2.9Mb
ERROR r-release-windows-x86_64

re-building of vignette outputs

Error(s) in re-building vignettes:
--- re-building 'v01_start.Rmd' using rmarkdown

Quitting from v01_start.Rmd:150-174 [unnamed-chunk-10]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<error/rlang_error>
Error:
! Future ('future_lapply-1') of class MiraiMultisessionFuture was terminated while running, while running on localhost (error code 19) [future 'future_lapply-1' (f872208047fb0329392cb27711493832-3); on f872208047fb0329392cb27711493832@CRANWIN3<26140> at 2026-03-29 05:31:46.597127]
---
Backtrace:
    ▆
 1. └─chopin::par_hierarchy(...)
 2.   └─future.apply::future_lapply(...)
 3.     └─future.apply:::future_xapply(...)
 4.       └─base::tryCatch(...)
 5.         └─base (local) tryCatchList(expr, classes, parentenv, handlers)
 6.           └─base (local) tryCatchOne(...)
 7.             └─value[[3L]](cond)
 8.               └─future.apply:::onError(e, futures = fs, debug = debug)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Error: processing vignette 'v01_start.Rmd' failed with diagnostics:
Future ('future_lapply-1') of class MiraiMultisessionFuture was terminated while running, while running on localhost (error code 19) [future 'future_lapply-1' (f872208047fb0329392cb27711493832-3); on f872208047fb0329392cb27711493832@CRANWIN3<26140> at 2026-03-29 05:31:46.597127]
--- failed re-building 'v01_start.Rmd'

--- re-building 'v02_good_practice.Rmd' using rmarkdown
--- finished re-building 'v02_good_practice.Rmd'

--- re-building 'v03_par_pad_grid.Rmd' using rmarkdown
--- finished re-building 'v03_par_pad_grid.Rmd'

--- re-building 'v04_climate_examples.Rmd' using rmarkdown
--- finished re-building 'v04_climate_examples.Rmd'

--- re-building 'v05_targets.Rmd' using rmarkdown
--- finished re-building 'v05_targets.Rmd'

SUMMARY: processing the following file failed:
  'v01_start.Rmd'

Error: Vignette re-building failed.
Execution halted

Check History

ERROR 10 OK · 3 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Mar 30, 2026
ERROR r-release-windows-x86_64

re-building of vignette outputs

Error(s) in re-building vignettes:
--- re-building 'v01_start.Rmd' using rmarkdown

Quitting from v01_start.Rmd:150-174 [unnamed-chunk-10]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<error/rlang_error>
Error:
! F
...[truncated]...
-building 'v04_climate_examples.Rmd'

--- re-building 'v05_targets.Rmd' using rmarkdown
--- finished re-building 'v05_targets.Rmd'

SUMMARY: processing the following file failed:
  'v01_start.Rmd'

Error: Vignette re-building failed.
Execution halted
NOTE r-oldrel-macos-arm64

installed package size

installed size is  6.9Mb
  sub-directories of 1Mb or more:
    data      3.0Mb
    extdata   2.9Mb
NOTE r-oldrel-macos-x86_64

installed package size

installed size is  6.9Mb
  sub-directories of 1Mb or more:
    data      3.0Mb
    extdata   2.9Mb
NOTE r-oldrel-windows-x86_64

installed package size

installed size is  5.9Mb
  sub-directories of 1Mb or more:
    data      2.0Mb
    extdata   2.9Mb
NOTE 11 OK · 3 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 28, 2026
NOTE r-oldrel-macos-arm64

installed package size

installed size is  6.9Mb
  sub-directories of 1Mb or more:
    data      3.0Mb
    extdata   2.9Mb
NOTE r-oldrel-macos-x86_64

installed package size

installed size is  6.9Mb
  sub-directories of 1Mb or more:
    data      3.0Mb
    extdata   2.9Mb
NOTE r-oldrel-windows-x86_64

installed package size

installed size is  5.9Mb
  sub-directories of 1Mb or more:
    data      2.0Mb
    extdata   2.9Mb
ERROR 9 OK · 3 NOTE · 0 WARNING · 2 ERROR · 0 FAILURE Mar 20, 2026
ERROR r-devel-windows-x86_64

re-building of vignette outputs

Error(s) in re-building vignettes:
--- re-building 'v01_start.Rmd' using rmarkdown
--- finished re-building 'v01_start.Rmd'

--- re-building 'v02_good_practice.Rmd' using rmarkdown
--- finished re-building 'v02_good_practice.Rmd'

--- re-building 'v0
...[truncated]...
ng 'v04_climate_examples.Rmd'

--- re-building 'v05_targets.Rmd' using rmarkdown
--- finished re-building 'v05_targets.Rmd'

SUMMARY: processing the following file failed:
  'v03_par_pad_grid.Rmd'

Error: Vignette re-building failed.
Execution halted
ERROR r-release-windows-x86_64

examples

Running examples in 'chopin-Ex.R' failed
The error most likely occurred in:

> ### Name: par_pad_grid
> ### Title: Get a set of computational grids
> ### Aliases: par_pad_grid
> 
> ### ** Examples
> 
> lastpar <- par(mfrow = c(1, 1))
> # data
> libra
...[truncated]...
")
+   plot(nc_comp_region_h3$padded$geometry, main = "H3 padded grid (lv.4)")
+ }
Input sf object should be in WGS84 (EPSG:4326) CRS.
although coordinates are longitude/latitude, st_intersects assumes that they
are planar
Switch sf class to terra...
NOTE r-oldrel-macos-arm64

installed package size

installed size is  6.9Mb
  sub-directories of 1Mb or more:
    data      3.0Mb
    extdata   2.9Mb
NOTE r-oldrel-macos-x86_64

installed package size

installed size is  6.9Mb
  sub-directories of 1Mb or more:
    data      3.0Mb
    extdata   2.9Mb
NOTE r-oldrel-windows-x86_64

installed package size

installed size is  5.9Mb
  sub-directories of 1Mb or more:
    data      2.0Mb
    extdata   2.9Mb
NOTE 11 OK · 3 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026
NOTE r-oldrel-macos-arm64

installed package size

installed size is  6.9Mb
  sub-directories of 1Mb or more:
    data      3.0Mb
    extdata   2.9Mb
NOTE r-oldrel-macos-x86_64

installed package size

installed size is  6.9Mb
  sub-directories of 1Mb or more:
    data      3.0Mb
    extdata   2.9Mb
NOTE r-oldrel-windows-x86_64

installed package size

installed size is  5.9Mb
  sub-directories of 1Mb or more:
    data      2.0Mb
    extdata   2.9Mb

Dependency Network

Dependencies Reverse dependencies anticlust cli dplyr exactextractr future future.apply igraph rlang sf sfheaders stars terra mirai (>= 1.3.0) collapse chopin

Version History

updated 0.9.9-5 ← 0.9.9 diff Apr 3, 2026
new 0.9.9 Mar 10, 2026
updated 0.9.9 ← 0.9.4 diff Sep 9, 2025
new 0.9.4 Jul 17, 2025