Closed fawda123 closed 2 years ago
Looking amazing!
My comments:
@ben-wetherill should be done:
anlzMWRmap(res = resdat, param = "DO", acc = accdat, sit = sitdat, maptype = NULL, locgroup = 'Sudbury', addwater = T, warn = F, latlon = F)
The latlon and location group work great.
The addwater is not quite exciting me yet. First of all, it takes a really long time to run, and a really long time to load the package. Each time I run a map, it takes several minutes. I also received a message at the beginning "Do you want to install from sources the packages which need compilation?" That will be troublesome for users. Secondly, it shows all water bodies, so it has a lot of extra water bodies that are probably not needed, especially for large scale maps. It's hard to see the rivers from the puddles.
Hm, it should not take that long to make the maps. It only takes a few seconds to make the map on my end, but that's just for the examples in the vignette. Does it take longer for other plots you've made?
It's also possible we can just clip the downloaded vector objects that overlap with site locations, although that might look odd since the downloaded objects aren't continuous. Maybe that's something we can decide during beta testing?
The load time for the package should only be a few seconds. I just noticed I accidentally had a copy of the website in the main branch of the package, which I just deleted. Try reinstalling and see if the load time is the same. The compilation message is also odd, I don't see that on my end. We can discuss on Thursday.
It seems to be running faster now - 10 seconds for full OARS dataset.
I keep getting this error
anlzMWRmap(resdat, param="DO saturation", acc=dqoaccdat, sit=sitedat,
palcol = "Spectral", maptype = "terrain-background", addwater = TRUE,
latlon = FALSE, locgroup = "Lower Assabet",)
Error in resp_abort()
:
! HTTP 504 Gateway Timeout.
Run rlang::last_error()
to see where the error occurred.
Warning message:
In st_buffer.sfc(., dist = units::set_units(buffdist, degree)) :
st_buffer does not correctly buffer longitude/latitude data
And this message Coordinate system already present. Adding new coordinate system, which will replace the existing one.
And this warning: anlzMWRmap(resdat, param="DO saturation", acc=dqoaccdat, sit=sitedat, palcol = "Spectral", maptype = NULL, addwater = TRUE, latlon = FALSE, locgroup = "Sudbury",) Warning message: In st_buffer.sfc(., dist = units::set_units(buffdist, degree)) : st_buffer does not correctly buffer longitude/latitude data
@ben-wetherill let me know if you still get that timeout error. I think that's caused by a server issue with the open street map layer when you use the addwater
option. I updated the code so it will ping the server again until it gets the data, but it's difficult to test on my end.
I need to figure out those other warnings/messages. I know what causes it, but it's tricky to suppress.
Adding this here for my own reference: https://stackoverflow.com/questions/71927170/how-to-suppress-warnings-globally-in-a-r-package-function
I'm not getting the timeout error any more.
Create function to map results, uses results, accuracy, and sites file:
Results need to be summarized acros dates for a site, then color results by magnitude.