MacroSHEDS / data_processing

Scripts for the retrieval and harmonization of federally funded river and stream data (USA)
MIT License
1 stars 8 forks source link

get_hdetlim_or_uncer: overlapping detlim dates suspicions #172

Closed westonslaughter closed 8 months ago

westonslaughter commented 1 year ago

image image

It seems that the handling for overlapping (aka contradicting) detection limits entries is not fully working (though I may be totally missing something) and while it seems reasonable values are produced as far as I have seen, it is likely worth fully vetting that this function stops or at least warns in situation like shown in the dataframe above. In this dataframe, the source data had an "NA" for the end date on the detlim entry in row four, and it supplies the Sys.Date() as a fill in for the end. This creates a huge overlap. The function also quietly resolved over this provided detlim data which itself overlaps (the original Sleepers detlim info overlaps a lot)

vlahm commented 1 year ago

@westonslaughter good catch. i don't remember building any catches for this kind of overlap, so what we probably have now is an arbitrary preference situation. i'm guessing it's rare, but something to resolve so that we have more accurate BDL replacements in v2.