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
############################################################################################# | |
# title : Perform a Mann-Kendall trend test of satellite image time series | |
# purpose : Mann-Kendall test of monotonic trend and associated statistical significance | |
# author : Abdulhakim Abdi (@HakimAbdi) | |
# input : Raster stack/brick comprising a time series of observations | |
# output : Raster object of monotoic trend (Kendall's tau), significance or both (i.e. brick) | |
# data : Test data: https://www.dropbox.com/sh/bz0fxvtm27mf4w8/AADE8kOPKnx1c84QxJDSAoyAa?dl=0 | |
# notes : Depending on the time series, it is might be useful prewhiten the data to remove serial correlation | |
# : prior to extracting the trend. See blog post on www.hakimabdi.com for more information. | |
############################################################################################# |
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
## Modified from Babak Mohammadi's script | |
## Set working folder so you don't have to type the whole address when loading file | |
setwd("D:/MSc/LU/NGEN08_Satellite_RS/Exercise/3_Lunds_kommun/Module_3/Classification") | |
#getwd() | |
## Uncomment to install required packages below | |
#install.packages("RStoolbox") | |
#install.packages("monmlp") | |
#install.packages("readxl") #read excel spreadsheet instead of csv |
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
rm(list = ls()) | |
setwd("D:/Learn/Rleaflet") | |
install.packages("shiny") | |
install.packages("leaflet") | |
library(leaflet) | |
library(htmltools) | |
library(sp) | |
library(rgdal) |
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
## Set working directory | |
setwd("D:/MSc/LU/NGEN08_Satellite_RS/Exercise/4_Time_series/Climate") | |
getwd() #Print wd | |
rm(list=ls()) #Clear Environment | |
## Load library | |
library(sp) | |
library(rgdal) | |
library(raster) | |
library(writexl) |
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
#----------------------------------------------------------------------- | |
# SET WORKING DIRECTORY | |
#----------------------------------------------------------------------- | |
setwd("D:/Side/") | |
getwd() #Print wd | |
#rm(list=ls()) #Clear Environment | |
#----------------------------------------------------------------------- |
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
getwd() | |
setwd("/path/RadarRemoteSensing/") | |
dev.off(dev.list()["RStudioGD"]) | |
rm(list= ls(all.names=TRUE)) | |
library(rgdal) | |
library(sp) | |
library(sf) | |
library(raster) |
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
# materials: https://forloopsandpiepkicks.wordpress.com/2021/04/09/image-segmentation-in-r-automatic-background-removal-like-in-a-zoom-conference/ | |
getwd() | |
setwd("D:/Learn/DL/oxford_pets/") | |
library(tidyverse) | |
library(keras) | |
library(tensorflow) | |
#remotes::install_github("maju116/platypus") | |
library(platypus) |
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
library(raster) | |
library(rasterVis) | |
library(stringr) | |
library(zoo) # time series handling | |
library(strucchange) # break detection | |
library(colorspace) | |
devtools:::install_github("gearslaboratory/gdalUtils") | |
devtools:::install_github('loicdtx/bfastSpatial') | |
library(gdalUtils) | |
library(bfastSpatial) |
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
# ===================================================== | |
# define U-Net model architecture | |
def build_unet(img_shape): | |
# input layer shape is equal to patch image size | |
inputs = Input(shape=img_shape) | |
# rescale images from (0, 255) to (0, 1) | |
rescale = Rescaling(scale=1. / 255, input_shape=(img_height, img_width, img_channels))(inputs) | |
previous_block_activation = rescale # Set aside residual |
OlderNewer