Skip to content

Replace raw SQL in network_extract.R with fresh::frs_network()#24

Merged
NewGraphEnvironment merged 2 commits intomainfrom
fresh-network-extract
Mar 10, 2026
Merged

Replace raw SQL in network_extract.R with fresh::frs_network()#24
NewGraphEnvironment merged 2 commits intomainfrom
fresh-network-extract

Conversation

@NewGraphEnvironment
Copy link
Copy Markdown
Owner

Summary

  • Replace 50-line hand-written SQL + DBI connection in data-raw/network_extract.R with a single fresh::frs_network() call using upstream_measure (network subtraction)
  • Regenerate bundled inst/testdata/streams.gpkg — same 50 segments, one boundary segment shifted due to pure ltree vs old hybrid DRM+ltree approach
  • All 118 tests pass, VCA pipeline verified

Test plan

  • devtools::test() — 118 passing
  • VCA pipeline runs on regenerated streams (10.5% valley cells, consistent with previous)
  • Compared old vs new: 49/50 segments identical, column/stream/order match

Relates to NewGraphEnvironment/sred-2025-2026#5

🤖 Generated with Claude Code

NewGraphEnvironment and others added 2 commits March 7, 2026 15:28
fly is airphoto footprint estimation, diggs is BC Historic Airphoto
Explorer — not downstream mapping/Shiny for drift/flooded.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Swap 50-line hand-written SQL + DBI connection for a single
frs_network() call with upstream_measure (network subtraction).
Regenerate bundled streams.gpkg — same 50 segments, one boundary
segment shifted due to pure ltree vs old hybrid DRM+ltree approach.
All 118 tests pass.

Fixes #22

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@NewGraphEnvironment NewGraphEnvironment merged commit 84af241 into main Mar 10, 2026
1 check passed
@NewGraphEnvironment NewGraphEnvironment deleted the fresh-network-extract branch March 10, 2026 03:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant