Closed NewGraphEnvironment closed 6 months ago
fpr::fpr_db_query("SELECT * FROM bcfishpass.barriers_anthropogenic WHERE barriers_anthropogenic_id IN ('785afb41-dfdf-423c-a291-e213d4b44f26','320902cd-48fc-40e5-8c0f-191086f332aa','957546a9-e6c7-46bf-947a-b17d8a818d71')")
#> Query time = 1.3 seconds!
#> Simple feature collection with 3 features and 10 fields
#> Geometry type: POINT
#> Dimension: XY
#> Bounding box: xmin: 1236682 ymin: 1227875 xmax: 1314500 ymax: 1256071
#> Projected CRS: NAD83 / BC Albers
#> barriers_anthropogenic_id barrier_type barrier_name
#> 1 320902cd-48fc-40e5-8c0f-191086f332aa DAM <NA>
#> 2 785afb41-dfdf-423c-a291-e213d4b44f26 DAM <NA>
#> 3 957546a9-e6c7-46bf-947a-b17d8a818d71 DAM <NA>
#> linear_feature_id blue_line_key watershed_key downstream_route_measure
#> 1 234041162 359572348 359572348 1684325
#> 2 166059171 359572348 359572348 1706738
#> 3 234019095 359572348 359572348 1597446
#> wscode_ltree localcode_ltree watershed_group_code geom
#> 1 200.948755 200.948755.861026 UPCE POINT (1249342 1227875)
#> 2 200.948755 200.948755.871814 PCEA POINT (1236682 1230968)
#> 3 200.948755 200.948755.816999 UPCE POINT (1314500 1256071)
Created on 2024-05-28 with reprex v2.1.0
solution
dams <- c('785afb41-dfdf-423c-a291-e213d4b44f26',
'320902cd-48fc-40e5-8c0f-191086f332aa',
'957546a9-e6c7-46bf-947a-b17d8a818d71')
then when generating df to build dashboard with
... |>
dplyr::filter(is.na(barriers_anthropogenic_dnstr) |
str_detect(barriers_anthropogenic_dnstr, paste(dams, collapse = "|")))
Looks like the dams are in there still