NewGraphEnvironment / fpr

Fish Passage Reporting functions for British Columbia
http://www.newgraphenvironment.com/fpr/
Other
2 stars 2 forks source link

`fpr_sp_watershed` - add param `col_id` #66

Open NewGraphEnvironment opened 8 months ago

NewGraphEnvironment commented 8 months ago

Add param col_id with default stream_crossing_id to allow backwards compatibility and future flexibility for content of dataframe provided. Should work to address watershed area generation for https://github.com/NewGraphEnvironment/fish_passage_fraser_2023_reporting/issues/59

https://github.com/NewGraphEnvironment/fpr/blob/b9eb9d344740d6b8f83200e5a0ef0de66ddcb5fd/R/spatial.R#L30

May as well put as stand alone script to avoid shopping around in spatial.R at the same time

Can be tested for backwards compatibility using past fp repo scripts in scripts/02_reporting/0170-load_wshd_stats.R

no action required now but: Considering eventually moving fpr_sp functions that are not really "fish passage reporting spatial" specific (especially when stream_crossing_id is parameterized) to separate package

This function has always been called as part of report setup (vs build) so deprecating completely after move will not break any past reports but perhaps just a note to user (and badge) in the help that there is a new function somewhere (superseded) would work fine and allow updates to watershed areas using unaltered historic repo scripts if required...