-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new source data, converting to sf/terra, still some TODOs
- Loading branch information
1 parent
d332446
commit a197246
Showing
22 changed files
with
630 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
library(latticeExtra) | ||
library(hexbin) | ||
library(tactile) | ||
library(terra) | ||
library(soilDB) | ||
|
||
|
||
x <- read.csv('fractal-dimension-test.csv.gz') | ||
x$invesintens <- factor(x$invesintens, levels = c('missing', 'Order 1', 'Order 2', 'Order 3', 'Order 4', 'Order 5')) | ||
|
||
y <- read.csv('entropy-by-mukey.csv.gz') | ||
|
||
z <- merge(x, y[, c('mukey', 'mukind', 'entropy')], by = 'mukey', all.x = TRUE, sort = FALSE) | ||
head(z) | ||
|
||
z <- z[which(z$entropy > 0), ] | ||
|
||
|
||
# figure elements and style | ||
.fy <- '2023' | ||
.title <- sprintf('FY%s SSURGO\n100k Samples', .fy) | ||
.cp <- hcl.colors(100, 'zissou1') | ||
.cpf <- colorRampPalette(.cp) | ||
|
||
hexbinplot( | ||
fd ~ entropy, | ||
data = z, | ||
xbins = 25, | ||
main = .title, | ||
xlab = 'Shannon Entropy (base 2)', | ||
ylab = 'Fractal Dimension', | ||
trans = log, | ||
inv = exp, | ||
asp = 1, | ||
colramp = .cpf, | ||
type = 'g', | ||
subset = fd < 1.9, | ||
scales = list(tick.number = 6, alterntating = 1), | ||
colorkey = FALSE, | ||
par.settings = tactile.theme() | ||
) |
Binary file not shown.
Binary file not shown.
Oops, something went wrong.