library(aqp)
library(soilDB)
# library(plyr)
library(sharpshootR)
library(latticeExtra)
library(colorspace)
library(ggplot2)
library(treemapify)
plotSPC()
colorscience
packagepreviewColors()
colorQuantiles()
colordist
packagesoilColorSignature()
mix_and_clean_colors()
# get lab / morphologic data
# simplify colors
x <- fetchKSSL(series='clarksville', returnMorphologicData = TRUE, simplifyColors = TRUE)
# extract pedons into SoilProfileCollection
s <- x$SPC
# genhz
s$genhz <- generalize.hz(
x = s$hzn_desgn,
new = c('A', 'E', 'Bt', '2Bt', '3Bt'),
pattern = c('A', 'E', '^Bt', '2B', '3B'),
non.matching.code = NA
)
s$genhz <- factor(s$genhz, levels = guessGenHzLevels(s, "genhz")$levels)
table(s$genhz, useNA = 'always')
##
## A E Bt 2Bt 3Bt <NA>
## 179 206 363 343 115 68
MDS representation of unique colors, based on CIE2000 distances.
previewColors(s$moist_soil_color, method = 'MDS', pt.cex = 1.5)
title('Clarksville Soil Colors')
Arrange colors in a grid, based on CIE2000 distances.
previewColors(s$moist_soil_color)
title('Clarksville Soil Colors')