-
Notifications
You must be signed in to change notification settings - Fork 23
geospatial function updates #527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
cristinamullin
commented
Sep 18, 2024
- includes all updates from Add non-ATTAINS catchments to GetATTAINS, error handling updates #521
- includes upstream changes from develop & fixes merge conflicts
Co-authored-by: Matt Brousil <[email protected]>
Co-authored-by: Matt Brousil <[email protected]>
Co-authored-by: Matt Brousil <[email protected]>
GetATTAINS changes, error handling updates
arcgislayers is not available on CRAN so this causes check errors. Hopefully it will become available on CRAN again in the future
test-GeospatilFcuntions.R failing
lines 112-120
# fetchNHD ----
testthat::test_that(
desc = "fetchNHD handles valid input data",
code = {
valid_data <- sf::st_sf(geometry = sf::st_sfc(sf::st_point(c(0, 0))), crs = 4326)
result <- fetchNHD(.data = valid_data)
expect_false(is.null(result))
}
)
|
There is still an issue with using the arcgislayers package as a dependency for the TADA_GetATTAINS function since it is not available on CRAN anymore. I tried to add arcgislayers (and its dependencies arcgis and arcpbf) under "Remotes:" in the description file, but that did not work. e.g., Remotes: github::R-ArcGIS/arcgislayers
It looks like we have two options: 1) we can include the code from arcgislayers directly in TADA instead of importing that package, or 2) we wait for them to get that package back on CRAN (not sure how long that might be, but it only just fell off CRAN last month). https://stackoverflow.com/questions/59549652/how-can-a-package-on-cran-import-a-package-not-on-cran |
@cristinamullin yes it's so unfortunate that they dropped it off CRAN (I think it may have been like the day or two before my initial pull request 😭). I do have confidence that it will be brought back online, but no idea how long that might take... Another option would be for me to use a different downloading approach and remove the arcgislayers package functions for the time being (with the hope of putting it back in place once it's back on CRAN - arcgislayers is by far the fastest way to download geospatial data out there). This would likely take me about a day to complete? In the meantime, I am currently exploring how easy it would be for us to add in (and compartmentalize) the current {arcgis} suite of functions and add to EPATADA. Please stay tuned! |
Ugh, yes very unfortunate timing! We are interested in submitting TADA to CRAN soon... and it could be that this is available on CRAN again by the time we are ready for our submission... so I hate to create additional work but it could also take them a long time. I like the options you mentioned 1) if we can use a different package or 2) add in (and compartmentalize) the current {arcgis} suite of functions and add to EPATADA. Thanks for looking into it! |
kathryn-willi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cristinamullin - I wasn't able to get the required code in {arcgislayers} to run properly when added to EPATADA directly. 😞 So instead I have written new "placeholder" functions that do not use anything from {arcgislayers}, and are subsequently a bit slower...
I also just commented out the original functions that used {arcgislayers} so that it will be easier for us to put it back in place when the package is put back on CRAN.
Please let me know how best to incorporate these changes: currently they are just code suggestions. (I was having difficulty fetching the ROSSyndicate-review branch, but I'm also not super branch savvy. I will touch base with my team Monday and hopefully have something a bit more robust if needed.)
I'm so sorry for all the mess associated with this PR!
Co-authored-by: Katie/Ryn Willi (she/her) <[email protected]>
|
Thanks @kathryn-willi for the code suggestions. I like your solution! I committed them to this branch but it looks like there is an outstanding bracket issue. I can help troubleshoot next week if you don't get to it before me. |
Hey @cristinamullin - I think the issue is that the suggested code I added should have fully replaced the fetchATTAINS code but the old contents somehow did not get deleted. I believe that deleting lines 883-1284 should resolve the issue! |