NewGraphEnvironment / fish_passage_skeena_2023_reporting

https://newgraphenvironment.github.io/fish_passage_skeena_2023_reporting
Creative Commons Zero v1.0 Universal
0 stars 2 forks source link

`fwapgr::fwa_watershed_at_measure` throwing API error #48

Closed NewGraphEnvironment closed 4 months ago

NewGraphEnvironment commented 5 months ago

noted here https://github.com/NewGraphEnvironment/fish_passage_skeena_2023_reporting/pull/47

this is likely because of transfer of IP addresses to our newest remote server. This will likely be addressed soon in fwapgr and pgfeatureserv but can also likely be addressed by explicity telling fwapgr and pgfeatureserv ( https://github.com/poissonconsulting/pgfeatureserv ) which url to connect to (PG_HOST_SHARE) or just calling the functions directly through fpr_db_query (ya - that works too - lots of examples in bcfishpass)

Best route right now is just to wait a week or two for fwapgr to be updated if it doesn't mess us up too bad to continue to progress

Maybe not a bad example of why we cache results from potentially unstable APIs when scripting report production (balance between reproducible and iterative)

would be good to link to where this issue is occurring here

NewGraphEnvironment commented 4 months ago

https://github.com/poissonconsulting/fwapgr/commit/3c63adae5a09e4e894f34d12449d1eced32a02a1

ggplot2::ggplot() +
  ggplot2::geom_sf(data =
                     fwapgr::fwa_watershed_at_measure(
                       360879896,
                       downstream_route_measure = 10000,
                       transform = c("ST_Simplify", 100)
                     ),
                   lwd = 0.15, fill = "steelblue", alpha = 0.5)

Created on 2024-04-07 with reprex v2.1.0