Exporation of Sentinel-1 coherence + intensity, TWI, and Sentinel-2 surface reflectance in Boreal pilot site. Labels are the ABMI photoplots which have been edited by DUC.
Summary of the number of polygons of each class
library(dplyr)
library(ggplot2)
library(xgboost)
library(knitr)
library(plotly)
library(caret)
library(kableExtra)
setwd("C:/Users/Evan/Desktop/ALPHA/WetlandPilot_ABMI_DUC/Explore")
d <- read.csv("WetlandStats_pilotSite.csv")
d <- as.data.frame(d)
d <- d %>% dplyr::select(-system.index, -.geo)
d <- na.omit(d)
d <- d %>% filter(WetlandCla != "Open Water")
#summary of interpretation
WC <- c("Marsh", "Swamp", "Open Water", "Upland")
summary <- d %>% group_by(WetlandCla) %>% summarize(n())
kable(summary) %>% kable_styling(bootstrap_options = "striped", font_size = 14)| WetlandCla | n() |
|---|---|
| Bog | 267 |
| Fen | 329 |
| Marsh | 56 |
| Open water | 82 |
| Swamp | 388 |
| Upland | 942 |
This explores the class seperation for the selection of EO variables
dfilt <- d %>% filter(WetlandCla != "Open water") %>% filter(WetlandCla != "Upland")
RSvars <- c("coherenceMean", "coherencePeriod_p4", "coherencePeriod_p5", "coherencePeriod_p6", "coherenceSD",
"TWI", "VH", "VV", "B2", "B3", "B4", "B8", "B11", "B12", "NDVI", "NDVI705", "NDWI1", "NDWI2", "REIP", "ARI")
joinC <- data.frame(WetlandCla = c("Bog", "Fen", "Marsh", "Swamp"), WCcolor = c('#BF584B', '#CBE39B', '#FEE391', '#009474'))
dfilt <- merge(dfilt, joinC, by = "WetlandCla")
for (i in 1:length(RSvars)){
var <- RSvars[i]
print(
ggplot(dfilt, aes_string(x = "WetlandCla", y = var, fill = "WetlandCla")) +
geom_violin() +
scale_fill_manual(name = "", values=c('#BF584B', '#CBE39B', '#FEE391', '#009474')) +
xlab("Wetland class")
)
}This explores the class seperation for the selection of EO variables
RSvars <- c("coherenceMean", "coherencePeriod_p4", "coherencePeriod_p5", "coherencePeriod_p6", "coherenceSD",
"TWI", "VH", "VV", "B2", "B3", "B4", "B8", "B11", "B12", "NDVI", "NDVI705", "NDWI1", "NDWI2", "REIP", "ARI")
for (i in 1:length(RSvars)){
var <- RSvars[i]
print(
ggplot(d, aes_string(x = "WetlandCla", y = var, fill = "WetlandCla")) +
geom_violin() +
scale_fill_manual(name = "", values=c('#BF584B', '#CBE39B', '#FEE391', '#08306B', '#009474', "#006D2C")) +
xlab("Wetland class")
)
}