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

plotSPC / fixOverlap: profile-specific parameters #295

Open
dylanbeaudette opened this issue Aug 22, 2023 · 0 comments
Open

plotSPC / fixOverlap: profile-specific parameters #295

dylanbeaudette opened this issue Aug 22, 2023 · 0 comments

Comments

@dylanbeaudette
Copy link
Member

Consider profile-specific charge density for method = "E", or adaptive selection of "E" vs. "S".

Some options for profile-specific settings:

  • profileInformationIndex()
  • "number of horizons per 100cm of depth"
library(aqp)
library(soilDB)

s <- c('inks' , 'pardee', 'clarksville', 'palau', 'hao', 'inks', 'eheuiki', 'puaulu', 'zook', 'cecil')
x <- fetchOSD(s)

par(mar = c(0, 0, 0, 3))

.args <- list(width = 0.3, name.style = 'center-center', hz.depths = TRUE, cex.names = 1)
options(.aqp.plotSPC.args = .args)

plotSPC(x, fixOverlapArgs = list(method = 'E', q = 1.25), max.depth = 151)
plotSPC(x, fixOverlapArgs = list(method = 'E', q = 1), max.depth = 151)
plotSPC(x, fixOverlapArgs = list(method = 'E', q = 0.75), max.depth = 151)
plotSPC(x, fixOverlapArgs = list(method = 'E', q = 0.5), max.depth = 151)
plotSPC(x, fixOverlapArgs = list(method = 'E', q = 0.25), max.depth = 151)

plotSPC(x, fixOverlapArgs = list(method = 'S'), max.depth = 151)

# profile information index
profileInformationIndex(x, vars = 'top', baseline = TRUE, method = 'median')

# number of horizons / 100cm depth
hzdensity <- profileApply(x, function(i) {
  (nrow(i) / max(i)) * 100
}
)

q <- aqp:::.rescaleRange(hzdensity, 0.25, 1.25)

# ...

The latter is simpler and probably more relevant to label placement.

@dylanbeaudette dylanbeaudette changed the title plotSPC / fixOverlap: plotSPC / fixOverlap: profile-specific parameters Aug 22, 2023
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

1 participant