Problem
data-raw/network_extract.R uses raw SQL with DBI::dbConnect() and sf::st_read() to query the stream network between two points on the Bulkley mainstem. This is exactly the network subtraction pattern that fresh::frs_network() now handles via the upstream_measure parameter.
50 lines of hand-written SQL + connection management should be one frs_network() call.
Proposed Solution
Replace the raw SQL in network_extract.R with fresh::frs_network(). Verify output matches the current bundled inst/testdata/streams.gpkg (same segments, same attributes).
No changes to vignettes — they use bundled data and work offline.
Relates to NewGraphEnvironment/sred-2025-2026#5
Problem
data-raw/network_extract.Ruses raw SQL withDBI::dbConnect()andsf::st_read()to query the stream network between two points on the Bulkley mainstem. This is exactly the network subtraction pattern thatfresh::frs_network()now handles via theupstream_measureparameter.50 lines of hand-written SQL + connection management should be one
frs_network()call.Proposed Solution
Replace the raw SQL in
network_extract.Rwithfresh::frs_network(). Verify output matches the current bundledinst/testdata/streams.gpkg(same segments, same attributes).No changes to vignettes — they use bundled data and work offline.
Relates to NewGraphEnvironment/sred-2025-2026#5