feat: add get_rap_table() unified interface to tabular data API endpoints#20
feat: add get_rap_table() unified interface to tabular data API endpoints#20brownag merged 10 commits intobrownag:mainfrom
get_rap_table() unified interface to tabular data API endpoints#20Conversation
…ver, coverMeteorology, and production. Applies to issue brownag#12 "Add interface to various RAP APIs."
|
Hi @s-appleby, thanks for your interest in rapr and your contribution. For #12 I wanted to abstract out the internal logic from I probably did not do a very good job of laying out the breadcrumbs in the issue. Thinking about it a bit more now: the interface I want is an exported I appreciate the assistance moving along with these planned features. Either you can refactor this PR yourself based on above specs (let me know if you have any questions), or I can merge your PR and rework it myself. Regardless, please add yourself, with ORCID, as contributor in the DESCRIPTION file |
|
Hi @brownag, thanks for the feedback! I had that exact thought last night (at least about the single I'll dive into this tonight for a bit and see if I can come up with a In short: I'll work on |
|
Excellent. Good points, we are thinking the same way. I agree we probably do not need the thin wrappers. I would be fine with deprecating |
…depreciated get_rap_production16day_table() function.
…er for continued availability of now-depreciated production16day function. Updated description to include myself as a contributer, as suggested by @brownag.
|
The It is, of course, based on the original 16 day production specific function, with changes to allow different APIs to be called and format the results correctly when presented with only a single record per response. I kept the arguments as similar to I spent some time working on the documentation to keep it readable and still provide all the necessary information, hopefully it comes across clearly! I've tested Hope this is as helpful for others as it's been for me... really streamlines requesting these estimates for lots of study plots at the same time, glad I found your package! |
…"years". To emulate depreciated behavior, if a "year" argument is present in "..." its value will overwrite "years." Hopefully this will fix the failed R-CMD-check.
get_rap_table() unified interface to tabular data API endpoints
|
THanks very much for your contribution, Scott @s-appleby |
I wanted to use the tabular data API to access cover, coverMeteorology, and production estimates from RAP, so I made some edits to your 16-day production script to work with each of them. This addresses issue #12 as planned there.
I adhered to all your naming conventions, and updated the descriptions/list of columns for each function to match the various APIs. I ran tests on each using a multi-polygon sf object, and compared the results with those obtained from the RAP web map using the same polygon shapefiles, and everything seems to match up (with tiny differences in the estimates, presumably due to the conversion between sf vector and terra raster formats).
I also built the package and tested the new functions... they seem to work as intended and the help documentation seems to render as expected.
In any case, feel free to use these or not!