Coder Social home page Coder Social logo

multiple sensors -- fetchSCAN about soildb HOT 7 OPEN

ncss-tech avatar ncss-tech commented on June 2, 2024
multiple sensors -- fetchSCAN

from soildb.

Comments (7)

dylanbeaudette avatar dylanbeaudette commented on June 2, 2024

There are apparently some SCAN sites with multiple below-ground sensors too.

from soildb.

dylanbeaudette avatar dylanbeaudette commented on June 2, 2024

Several possible solutions:

  1. include all sensors and add an ID (done)
    • include a message when there are > 2 IDs per sensor type
  2. keep the first sensor (current approach for above-ground sensors)
  3. keep the sensor with the most data associated with it (by year)
  4. apply an aggregation function

from soildb.

dylanbeaudette avatar dylanbeaudette commented on June 2, 2024

Examples to follow-up on.

##  station 482
##
##  WTEQ.I WTEQ.I-2 PREC.I PREC.I-2 TOBS.I TOBS.I-2 TOBS.I-3 TMAX.D TMIN.D TAVG.D SNWD.I SMS.I_8 STO.I_8

## example of multiple versions of the below-ground sensors
## due to sensor repair, replacement, upgrades, loss of function, ???
##
##   station 2196
##
##  "STO.I-1:-2", "STO.I-1:-4", "STO.I-1:-8", "STO.I-1:-20", "STO.I-1:-40",
##  "STO.I-2:-2", "STO.I-2:-4", "STO.I-2:-8", "STO.I-2:-20", "STO.I-2:-40"

from soildb.

brownag avatar brownag commented on June 2, 2024
## example of multiple versions of the below-ground sensors
## due to sensor repair, replacement, upgrades, loss of function, ???

RE: site 2196

I am pretty sure that these are actually duplicate below-ground sensors. Both sensors are active as of 2021. The values are very similar but not identical.

library(soilDB)

f <- fetchSCAN(2196, 2021)
#> multiple sensors per depth [site 2196] STO.I_2, STO.I_4, STO.I_8, STO.I_20, STO.I_40, STO.I-2_2, STO.I-2_4, STO.I-2_8, STO.I-2_20, STO.I-2_40
#> 7301 records (0.33 Mb transferred)
f1 <- subset(f$STO, f$STO$sensor.id == "STO.I_2")
f2 <- subset(f$STO, f$STO$sensor.id == "STO.I-2_2")

plot(f1$value~f1$Date, type="l", lty = 2)
lines(f2$value~f2$Date, lty = 3)

summary(lm(f1$value ~ f2$value))
#> 
#> Call:
#> lm(formula = f1$value ~ f2$value)
#> 
#> Residuals:
#>       Min        1Q    Median        3Q       Max 
#> -0.214075 -0.051135 -0.000856  0.044210  0.185177 
#> 
#> Coefficients:
#>               Estimate Std. Error t value Pr(>|t|)    
#> (Intercept) -0.0991436  0.0058147  -17.05   <2e-16 ***
#> f2$value     1.0093109  0.0004542 2222.12   <2e-16 ***
#> ---
#> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> 
#> Residual standard error: 0.06935 on 363 degrees of freedom
#> Multiple R-squared:  0.9999, Adjusted R-squared:  0.9999 
#> F-statistic: 4.938e+06 on 1 and 363 DF,  p-value: < 2.2e-16

from soildb.

dylanbeaudette avatar dylanbeaudette commented on June 2, 2024

Good, those are simpler to account for. Keep in mind those notes and this issue has to do with all of the potential reasons for multiple sensors / type / depth. These were examples to follow-up on.

from soildb.

brownag avatar brownag commented on June 2, 2024

Do you have an example site ID where a sensor was replaced? I'd like to see one of those

from soildb.

brownag avatar brownag commented on June 2, 2024

An example might be sitenum=783

from soildb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.