Skip to content

Commit

Permalink
Merge pull request #104 from ropensci/0.8.3
Browse files Browse the repository at this point in the history
0.8.3
  • Loading branch information
sigmafelix authored Oct 12, 2024
2 parents e816594 + f74a323 commit 77b5c65
Show file tree
Hide file tree
Showing 23 changed files with 137 additions and 245 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-standard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
matrix:
config:
- {os: macos-latest, r: 'release'}
- {os: macos-13-xlarge, r: 'release'}
# - {os: macos-13-xlarge, r: 'release'}
# - {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ jobs:
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
shell: Rscript {0}

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4.4.1
with:
clean: false
branch: gh-pages
folder: docs
# - name: Deploy to GitHub pages 🚀
# if: github.event_name != 'pull_request'
# uses: JamesIves/github-pages-deploy-action@v4.4.1
# with:
# clean: false
# branch: gh-pages
# folder: docs
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ authors:
- given-names: Insang
family-names: Song
email: geoissong@gmail.com
affiliation: NIEHS
affiliation: 'Seoul National University'
orcid: 'https://orcid.org/0000-0001-8732-3256'
- given-names: Kyle P.
family-names: Messier
email: kyle.messier@nih.gov
affiliation: NIEHS
orcid: 'https://orcid.org/0000-0001-9508-9623'
repository-code: 'https://github.com/NIEHS/chopin'
repository-code: 'https://github.com/ropensci/chopin'
keywords:
- spatial data
- parallel processing
Expand Down
126 changes: 0 additions & 126 deletions CODE_OF_CONDUCT.md

This file was deleted.

12 changes: 8 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
Package: chopin
Title: Computation of Spatial Data by Hierarchical and Objective Partitioning of Inputs for Parallel Processing
Version: 0.8.2
Version: 0.8.3
Authors@R: c(
person("Insang", "Song", , "geoissong@gmail.com", role = c("aut", "cre"),
comment = c(ORCID = "0000-0001-8732-3256")),
person("Kyle", "Messier", role = c("aut", "ctb"),
comment = c(ORCID = "0000-0001-9508-9623"))
comment = c(ORCID = "0000-0001-9508-9623")),
person("Alec L.", "Robitaille", role = c("rev"),
comment = "Alec reviewed the package version 0.6.3 for rOpenSci, see <https://github.com/ropensci/software-review/issues/638>"),
person("Eric R.", "Scott", role = c("rev"),
comment = "Eric reviewed the package version 0.6.3 for rOpenSci, see <https://github.com/ropensci/software-review/issues/638>")
)
Description: Geospatial data computation is parallelized by grid, hierarchy,
or raster files. Based on future and mirai parallel backends, terra and sf
Expand All @@ -21,8 +25,8 @@ Description: Geospatial data computation is parallelized by grid, hierarchy,
simple areal interpolation (`summarize_aw`) and summation of
exponentially decaying weights (`summarize_sedc`) are also provided.
License: MIT + file LICENSE
URL: https://github.com/NIEHS/chopin
BugReports: https://github.com/NIEHS/chopin/issues
URL: https://docs.ropensci.org/chopin, https://github.com/ropensci/chopin
BugReports: https://github.com/ropensci/chopin/issues
Depends:
R (>= 4.1)
SystemRequirements: netcdf
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
- README.md: two mermaid plots are pre-generated as png files
- Internal `clip_*()` functions and `vect_validate()` are removed
- `par_map_args()` is renamed to `par_convert_f()`

- init.R: one-line initialization for `bbox` class detection (cf. https://github.com/r-spatial/sf/issues/2448)

# 0.7
- `.check_package` refactoring: no `library()` call is required
Expand Down
6 changes: 2 additions & 4 deletions R/chopin-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,12 @@
#' **Notes on data restrictions**
#'
#' `chopin` works best with **two-dimensional** (**planar**) geometries.
#' Users should disable `s2` spherical geometry mode in `sf` by setting.
#' Users should disable `s2` spherical geometry mode in `sf` by setting
#' `sf::sf_use_s2(FALSE)`.
#' Running any `chopin` functions at spherical or three-dimensional
#' (e.g., including M/Z dimensions) geometries
#' may produce incorrect or unexpected results.
#'
#' ```r
#' sf::sf_use_s2(FALSE)
#' ```
## usethis namespace: end
"_PACKAGE"
#nolint end
2 changes: 2 additions & 0 deletions R/init.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Initialize bbox class detection for sf backward compatibility
setOldClass("bbox")
22 changes: 14 additions & 8 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ knitr::opts_chunk$set(
# Computation of Spatial Data by Hierarchical and Objective Partitioning of Inputs for Parallel Processing <img src="man/figures/logo.svg" align="right" height="210" alt="overlapping irregular grid polygons filled with orange, green, and teal" /></a>

<!-- badges: start -->
[![cov](https://NIEHS.github.io/chopin/badges/coverage.svg)](https://github.com/NIEHS/chopin/actions)
[![R-CMD-check](https://github.com/NIEHS/chopin/actions/workflows/check-standard.yaml/badge.svg)](https://github.com/NIEHS/chopin/actions/workflows/check-standard.yaml)
[![cov](https://docs.ropensci.org/chopin/badges/coverage.svg)](https://github.com/ropensci/chopin/actions)
[![R-CMD-check](https://github.com/ropensci/chopin/actions/workflows/check-standard.yaml/badge.svg)](https://github.com/ropensci/chopin/actions/workflows/check-standard.yaml)
[![Status at rOpenSci Software Peer Review](https://badges.ropensci.org/638_status.svg)](https://github.com/ropensci/software-review/issues/638)
[![Lifecycle:
experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
experimental](https://img.shields.io/badge/lifecycle-stable-blue.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)

<!-- badges: end -->

Expand All @@ -43,7 +43,9 @@ future::plan(future.mirai::mirai_multisession, workers = 4L)
__Second,__ users choose the proper data parallelization configuration by creating a grid partition of the processing extent, defining the field name with values that are hierarchically coded, or entering multiple raster file paths into `par_multirasters()`. __Finally,__ users run `par_*()` function with the configurations set above to compute spatial variables from input data in parallel:

- `par_grid`: parallelize over artificial grid polygons that are generated from the maximum extent of inputs. `par_pad_grid` is used to generate the grid polygons before running this function.

- `par_hierarchy`: parallelize over hierarchy coded in identifier fields (for example, census blocks in each county in the US)

- `par_multirasters`: parallelize over multiple raster files


Expand All @@ -53,7 +55,9 @@ For grid partitioning, the entire study area will be divided into partly overlap
Processing functions accept [terra](https://github.com/rspatial/terra)/[sf](https://github.com/r-spatial/sf) classes for spatial data. Raster-vector overlay is done with `exactextractr`. Three helper functions encapsulate multiple geospatial data calculation steps over multiple CPU threads.

- `extract_at`: extract raster values with point buffers or polygons with or without kernel weights

- `summarize_sedc`: calculate sums of [exponentially decaying contributions](https://mserre.sph.unc.edu/BMElab_web/SEDCtutorial/index.html)

- `summarize_aw`: area-weighted covariates based on target and reference polygons


Expand Down Expand Up @@ -87,9 +91,14 @@ For **vector-oriented selection**, we suggest three factors to consider:

```r
rlang::check_installed("remotes")
remotes::install_github("NIEHS/chopin")
remotes::install_github("ropensci/chopin")
```

or you can also set `repos` in `install.packages()` as ROpenSci repository:

```r
install.packages("chopin", repos = "https://ropensci.r-universe.dev")
```

## Examples
Examples will navigate `par_grid`, `par_hierarchy`, and `par_multirasters` functions in `chopin` to parallelize geospatial operations.
Expand Down Expand Up @@ -433,9 +442,6 @@ Parallelization may underperform when the datasets are too small to take advanta


### Notes on data restrictions
`chopin` works best with **two-dimensional** (**planar**) geometries. Users should disable `s2` spherical geometry mode in `sf` by setting. Running any `chopin` functions at spherical or three-dimensional (e.g., including M/Z dimensions) geometries may produce incorrect or unexpected results.
`chopin` works best with **two-dimensional** (**planar**) geometries. Users should disable `s2` spherical geometry mode in `sf` by setting `sf::sf_use_s2(FALSE)`. Running any `chopin` functions at spherical or three-dimensional (e.g., including M/Z dimensions) geometries may produce incorrect or unexpected results.

```r
sf::sf_use_s2(FALSE)
```

Loading

0 comments on commit 77b5c65

Please sign in to comment.