Load the data you obtained from GEE

Once you extracted the data from Google Earth Engine, you can load it here. In our example the data file is called lst.csv (lake surface temperature). We extracted data for three lakes, which are monitored by Lithuaniam Environmental Protection Agency.

#Read in data from the Google colab
cls<-read.csv("Data_S2_class_coord_2.csv")
cls$Date<-as.Date(cls$Date)
cls$year<-year(cls$Date)
cls$yday<-yday(cls$Date)
cls$label<-'Satellite'
names(cls)[22]<-'Class'

Load the monitoring data

Here we will load the monitoring data example and join it with the satellite data.

load('insi_class.Rdata')
names(insi)[1]<-'monSiteCode'
names(insi)[2]<-'Lake_name'
names(insi)[3]<-'Date'
insi$label<-'In situ'
insi<-insi[!is.na(insi$Class),]
insi$year<-year(insi$Date)
insi$yday<-yday(insi$Date)

# join satellite and in situ data
all<-full_join(cls[,c(1:4,22:25)], insi[,c(1:4,8:10)])
all$Week<-strftime(all$Date, format='%V')
all$Week<-as.numeric(all$Week)

# We will only select data from April to October, as optical water data in the cold season is not reliable (due to possible ice cover)
all<-all[all$yday>100&all$yday<300,]
# set class as factor
all$Class<-factor(all$Class, levels=c('Clear','Moderate', 'Chla-dominated','Turbid'))
# remove those rows with NAs
allm<-all[!is.na(all$Class),]

Plot time series of class

The class can be observed when we can get cloudless pixel data. Timeseries of lake class help to observe changes in a lake and relate them to algal blooms (light blooms - Moderate class, strong blooms - Chla-dominated class).