Open cristinamullin opened 5 days ago
Note from Jesse: Tribal AUs do have catchments. The ATTAINS team is in the process of transitioning from one hydrography to another one, which is causing a problem for three of the tribes, but all the others should be working.
Will explore this as part of my next ATTAINS-related PR!
Will explore this as part of my next ATTAINS-related PR!
Thanks Katie! The easiest way to find tribes that are participating in ATTAINS is through HMW: https://mywaterway.epa.gov/tribe/CHOCNAT. The drop down on that page includes a list of all the current or past ATTAINS tribes.
Describe the bug
TADA_GetATTAINS takes a long time to run on tribal WQP datasets and is returning an empty dataframe even though there are relevant assessment units (see ATTAINS tribes in HMW for examples: https://mywaterway.epa.gov/tribe/REDLAKE and https://mywaterway.epa.gov/tribe/SFNOES). This is an issue with all the example tribal data I've tested so far (not just the point data).
To Reproduce
Code to reproduce the behavior:
Expected behavior
Most (not all) ATTAINS tribes use their WQP monitoring locations as their ATTAINS assessment units (points - lat/long). I would expect the WQP monitoring locations (points) to match up with the overlapping ATTAINS assessment units (points). They are often the same exact lat/long. Tribal assessment units that are lines/polys should work as well.
Additional context
This is not related to why the ATTAINS spatial data for tribes is not returning, but may still be a good option to try (faster). There is another ATTAINS service that can return the assessment unit and site crosswalk directly if the entity provided it (this crosswalk is required for tribes). We may be able to use that directly instead of, or in addition to, the spatial join. For example, the function could check for a crosswalk in ATTAINS first and use that if available. It’d be missing any new sites but might be a good start. If not available, THEN the function could run as it does now (using ATTAINS catchments to match sites and AUs).
Reminders for TADA contributors addressing this issue
Bug fixes should include all the following work:
[ ] Create or edit the function/code.
[ ] Document all code using line/inline and/or multi-line/block comments to describe what is does.
[ ] Create or edit tests in tests/testthat folder to help prevent and/or troubleshoot potential future issues.
[ ] Create or edit the function documentation. Include working examples.
[ ] Update or add the new functionality to the appropriate vignette (or create new one).
[ ] If function/code edits made as part of this issue impact other functions in the package or functionality in the shiny app, ensure those are updated as well.
[ ] Run TADA_UpdateAllRefs(), TADA_UpdateExampleData(), styler::style_pkg(), devtools::document(), and devtools::check() and address any new notes or issues before creating a pull request.
[ ] Run more robust check for releases: devtools::check(manual = TRUE, remote = TRUE, incoming = TRUE)