Closed ehinman closed 9 months ago
Thanks for the report! I had reported this issue to the WQP team when the services first came out and (at the time) said there's not much they can do since the column is created from improperly entered raw data. For example, pulling a couple of the sites that cause the funky years:
sites <- c("CHEROKEE-ILL1", "21NMEX-32RGRAND464.2C")
data <- readWQPqw(sites, "Dissolved oxygen (DO)")
range(data$ActivityStartDate)
"0005-05-19" "2206-08-24"
Should the first date be 2005-05-19? Probably, but the WQP folks don't want to be in the business of cleaning groups' data. Should that second date be 2006? maybe?
That being said, I'll check with them again to see if anything's changed (like maybe they'd consider not summarizing years that don't make sense ie before 1800 or after the current year).
Thanks Laura! I need to get a better sense for whether these issues lay with dataRetrieval or some other part of the system--don't want to bog you down with issues that need to be solved elsewhere. For now, I'll accommodate in my code.
It's probably best to continue to report issues here (on GitHub). We can coordinate who to contact easier than making the user try to figure it out.
I agree that we should re-visit the handling of improperly formatted data by the service. @ldecicco-USGS
Closing this issue because I don't want dataRetrieval to make the decisions on how to deal with improper dates, I want WQP to do that.
Describe the bug readWQPsummary() contains a YearSummarized column, which should contain (according to the help page) "the year of the summary". However, I tested a large query for DO data where the YearSummarized column contained non-real years (e.g. "5", "2206")
To Reproduce Steps to reproduce the behavior:
Expected behavior I am using YearSummarized in readWQPsummary() to define a date range to query using readWQPdata, and I expect a min and max year summarized in a normal YYYY format that can be used to define a YYYY-mm-dd to be placed into startDate and endDate in readWQPdata. With single digits and years that do not exist, readWQPdata will throw an error because the date is not in the correct format or does not exist--the max date in year 2206 (YYYY) shouldn't matter but a min year of 5 is a problem.
Screenshots If applicable, add screenshots to help explain your problem.
Session Info Please include your session info:
Additional context Add any other context about the problem here.