Skip to content
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

semi-corrupt data returned by fetchSCAN() queries #26

Closed
dylanbeaudette opened this issue Aug 17, 2017 · 4 comments
Closed

semi-corrupt data returned by fetchSCAN() queries #26

dylanbeaudette opened this issue Aug 17, 2017 · 4 comments

Comments

@dylanbeaudette
Copy link
Member

dylanbeaudette commented Aug 17, 2017

Every query to the SCAN / SNOTEL web-service returns an "extra" day on September 30th. This affects all sensors and all years.

image

@dylanbeaudette dylanbeaudette changed the title data corruption returned by fetchSCAN() queries semi-corrupt data returned by fetchSCAN() queries Aug 17, 2017
@dylanbeaudette
Copy link
Member Author

Update from Deb Harms:

Sorry, I have been in the field. Our data editor should of caught this. It is due to a site visit. When that happens, we do not have a consistent 24hrs of readings for the midnight values. Because we have interrupted the data collection. It is not unexpected. The data editor usually catches it, but I just hired a new guy and he hasn’t gotten thru some of the edits.

This kind of error shouldn't be all that common.

@HONG1992
Copy link

Excuse me?
I'm a novice for R. I would like to use fetchSCAN to query some data but it seems a problem when using this order. I tried to solve this problem by different versions of soilDB packages (2.0-1 and 2.0-3). It didn't work.

x <- fetchSCAN(site.code=c(356, 2072), year=c(2015,2016))
Error in as.Date.default(x$Date) :
do not know how to convert 'x$Date' to class “Date”

table(x$SMS$depth)
Error in table(x$SMS$depth) : object 'x' not found

check the results

str(x, 1)
Error in str(x, 1) : object 'x' not found

Sorry to disturb you!

@dylanbeaudette
Copy link
Member Author

Thanks for reporting this, however, the specific error (a big one) is unrelated to this issue.

Fixed with 7b11d5b.

TLDR: SCAN data are now returned from the webservice with an extra line at the top of the file.

You will have to update to the latest version of soilDB, then fetchSCAN() should work as expected.

I have updated the tutorial.

@HONG1992
Copy link

HONG1992 commented Mar 9, 2018

Thank you so much. I appreciate it!

dylanbeaudette added a commit that referenced this issue May 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants