Skip to content

State compliance with SP3.0 and SP3.1#294

Merged
cforgaci merged 7 commits into
mainfrom
srr-sp3.0-3.1-cf
Jul 25, 2025
Merged

State compliance with SP3.0 and SP3.1#294
cforgaci merged 7 commits into
mainfrom
srr-sp3.0-3.1-cf

Conversation

@cforgaci
Copy link
Copy Markdown
Contributor

No description provided.

@cforgaci cforgaci added this to the Ready for rOpenSci SSR milestone Jul 21, 2025
@cforgaci cforgaci requested a review from Copilot July 21, 2025 11:17
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the package documentation to state compliance with spatial statistics standards SP3.0 and SP3.1. The changes clarify that the package does use spatial neighbors through the get_cost_distance() function, which leverages terra::costDist() for cost distance calculations with slope-weighted neighbor contributions.

  • Updates documentation tags from "not applicable" to "compliant" for SP3.0 and SP3.1 standards
  • Adds detailed explanation of how spatial neighbors are handled via terra::costDist()
  • Maintains "not applicable" status for SP3.0b (irregular spaces) while providing clearer rationale

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
R/valley.R Adds SP3.1 compliance documentation to get_cost_distance() function
R/srr-stats-standards.R Updates SP3.0/SP3.1 status from NA to compliant with detailed explanations
Comments suppressed due to low confidence (1)

R/srr-stats-standards.R:115

  • The function name in the comment get_cost_dist() does not match the actual function name get_cost_distance() used in the code.
#' @srrstatsNA {SP3.0, SP3.0a} The `get_cost_dist()` internal function uses

@cforgaci cforgaci requested a review from fnattino July 21, 2025 22:25
Copy link
Copy Markdown
Contributor

@fnattino fnattino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think for this one we should refer to smooth_dem(), where we apply a spatial median filter using a square ("queen") neighborhood form.

Comment thread R/srr-stats-standards.R Outdated
Comment thread R/valley.R
@cforgaci cforgaci self-assigned this Jul 24, 2025
@cforgaci cforgaci requested a review from fnattino July 24, 2025 11:33
@cforgaci cforgaci merged commit 392d5e0 into main Jul 25, 2025
11 of 14 checks passed
@cforgaci cforgaci deleted the srr-sp3.0-3.1-cf branch July 25, 2025 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants