Summary of 2019 S1 and S2 data comapred to Indonesian Palm data from https://essd.copernicus.org/articles/13/1211/2021/. values extracted from GEE script - https://code.earthengine.google.com/3d54f3d02d1dc0e4d7347ea5b6b11ab0
Summary of the number of polygons of each class with 2019 Palm mask as training
library(dplyr)
library(ggplot2)
library(knitr)
library(plotly)
library(caret)
setwd("~/Downloads")
d <- read.csv("PalmExplore_S1S2.csv")
d <- as.data.frame(d)
WC <- c("Industrial", "Smallholder", "Other landcover")
joinC <- data.frame(classification = c(1:3), classTxt = WC, WCcolor = c('#CBE39B', '#FEE391', '#009474'))
d <- merge(d, joinC, by = "classification")
d <- d %>% dplyr::select(-system.index, -.geo)
d <- na.omit(d)
#summary of interpretation
summary <- d %>% group_by(classTxt) %>% summarize(n())
kable(summary)| classTxt | n() |
|---|---|
| Industrial | 1018 |
| Other landcover | 3481 |
| Smallholder | 480 |
With 2019 palm prediction as training
RSvars <- c("IRECI", "NDVI", "NDVI705", "NDWI", "PolRatio", "REIP", "VH_MTF", "VV_MTF", "green", "nir", "re1", "re2", "re3", "red", "swir1", "swir2")
for (i in 1:length(RSvars)){
var <- RSvars[i]
print(
ggplot(d, aes_string(x = "classTxt", y = var, fill = "classTxt")) +
geom_violin() +
scale_fill_manual(name = "", values=c('#ff0000', '#696969', '#ef00ff')) +
xlab("Class")
)
}With 2019 palm prediction as training
d <- filter(d, classification != 3)
for (i in 1:length(RSvars)){
var <- RSvars[i]
print(
ggplot(d, aes_string(x = "classTxt", y = var, fill = "classTxt")) +
geom_violin() +
scale_fill_manual(name = "", values=c('#ff0000','#ef00ff')) +
xlab("Class")
)
}