-
Notifications
You must be signed in to change notification settings - Fork 18
/
gee-water-resources-management-supplement.Rmd
214 lines (140 loc) · 10.8 KB
/
gee-water-resources-management-supplement.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
---
title: "Google Earth Engine for Water Resources Management (Supplementary Course)"
author: "Ujaval Gandhi"
output:
# word_document:
# toc: yes
# toc_depth: '3'
html_document:
df_print: paged
highlight: pygments
includes:
after_body: comment.html
toc: yes
toc_depth: 3
# pdf_document:
# latex_engine: xelatex
# toc: yes
# toc_depth: '3'
fontsize: 12pt
header-includes:
- \usepackage{fancyhdr}
- \pagestyle{fancy}
- \renewcommand{\footrulewidth}{0.4pt}
- \fancyhead[LE,RO]{\thepage}
- \geometry{left=1in,top=0.75in,bottom=0.75in}
- \fancyfoot[CE,CO]{{\includegraphics[height=0.5cm]{images/cc-by-nc.png}} Ujaval Gandhi
http://www.spatialthoughts.com}
---
\newpage
***
```{r echo=FALSE, fig.align='center', out.width='100%', out.width='250pt'}
knitr::include_graphics('images/spatial_thoughts_logo.png')
```
***
\newpage
# Introduction
This page contains Supplementary Materials for the Google Earth Engine for Water Resources Management course. It is a collection useful scripts and code snippets that can be adapted for your projects.
Please visit the [Google Earth Engine for Water Resources Management](https://courses.spatialthoughts.com/gee-water-resources-management.html) course page for the full course material.
# Drought Monitoring
## MODIS TCI
This script is adaptation of our [Vegetation Condition Index (VCI)](https://courses.spatialthoughts.com/gee-water-resources-management.html#calculate-vci) script to calculate Temperature Condition Index (TCI) using MODIS LST dataset. This is helpful in calculation of Vegetation Health Index (VHI) which is an index that is an average of VCI and TCI.
[Open in Code Editor ↗](https://code.earthengine.google.co.in/?scriptPath=users%2Fujavalgandhi%2FGEE-Water-Resources-Management%3ASupplement%2FDrought_Monitoring%2FMODIS_TCI){target="_blank"}
```{js eval=FALSE, code=readLines('code/gee_water_resources_management/Supplement/Drought_Monitoring/MODIS_TCI')}
```
## MODIS 16-Day VCI
This script is an adaptation of the [Drought Monitoring](https://courses.spatialthoughts.com/gee-water-resources-management.html#drought-monitoring) script that uses 16-day composites instead of monthly composites.
[Open in Code Editor ↗](https://code.earthengine.google.com/?scriptPath=users%2Fujavalgandhi%2FGEE-Water-Resources-Management%3ASupplement%2FDrought_Monitoring%2FMODIS_16day_VCI){target="_blank"}
```{js eval=FALSE, code=readLines('code/gee_water_resources_management/Supplement/Drought_Monitoring/MODIS_16day_VCI')}
```
## Pie Chart Group Statistics
[Open in Code Editor ↗](https://code.earthengine.google.com/?scriptPath=users%2Fujavalgandhi%2FGEE-Water-Resources-Management%3ASupplement%2FDrought_Monitoring%2FPie_Chart_Group_Statistics){target="_blank"}
```{js eval=FALSE, code=readLines('code/gee_water_resources_management/Supplement/Drought_Monitoring/Pie_Chart_Group_Statistics')}
```
# Hydrology
## Chart Cumulative Rainfall
[Open in Code Editor ↗](https://code.earthengine.google.com/?scriptPath=users%2Fujavalgandhi%2FGEE-Water-Resources-Management%3ASupplement%2FHydrology%2FChart_Cumulative_Rainfall){target="_blank"}
```{js eval=FALSE, code=readLines('code/gee_water_resources_management/Supplement/Hydrology/Chart_Cumulative_Rainfall')}
```
## Exporting Country-wide Precipitation Rasters
This script shows how to create a multi-band raster from a collection and export it. If you want to export each image separately, see our guide on [Exporting ImageCollections](https://courses.spatialthoughts.com/end-to-end-gee-supplement.html#exporting-imagecollections).
[Open in Code Editor ↗](https://code.earthengine.google.co.in/?scriptPath=users%2Fujavalgandhi%2FGEE-Water-Resources-Management%3ASupplement%2FHydrology%2FExporting_Precipitation_Rasters){target="_blank"}
```{js eval=FALSE, code=readLines('code/gee_water_resources_management/Supplement/Hydrology/Exporting_Precipitation_Rasters')}
```
## Exporting Pixel Values as Shapefiles
[Open in Code Editor ↗](https://code.earthengine.google.co.in/?scriptPath=users%2Fujavalgandhi%2FGEE-Water-Resources-Management%3ASupplement%2FHydrology%2FExporting_Pixel_Values){target="_blank"}
```{js eval=FALSE, code=readLines('code/gee_water_resources_management/Supplement/Hydrology/Exporting_Pixel_Values')}
```
## Extracting Precipitation Time-Series at Each Pixel
[Open in Code Editor ↗](https://code.earthengine.google.co.in/?scriptPath=users%2Fujavalgandhi%2FGEE-Water-Resources-Management%3ASupplement%2FHydrology%2FExporting_Precipitation_Time_Series){target="_blank"}
```{js eval=FALSE, code=readLines('code/gee_water_resources_management/Supplement/Hydrology/Exporting_Precipitation_Time_Series')}
```
## GPM Precipitation Time Series
[Open in Code Editor ↗](https://code.earthengine.google.com/?scriptPath=users%2Fujavalgandhi%2FGEE-Water-Resources-Management%3ASupplement%2FHydrology%2FGPM_Precipitation_Time_Series){target="_blank"}
```{js eval=FALSE, code=readLines('code/gee_water_resources_management/Supplement/Hydrology/GPM_Precipitation_Time_Series')}
```
## IMD Number of Rainy Days
[Open in Code Editor ↗](https://code.earthengine.google.com/?scriptPath=users%2Fujavalgandhi%2FGEE-Water-Resources-Management%3ASupplement%2FHydrology%2FIMD_Number_of_Rainy_Days){target="_blank"}
```{js eval=FALSE, code=readLines('code/gee_water_resources_management/Supplement/Hydrology/IMD_Number_of_Rainy_Days')}
```
# Surface Water
## Animating Surface Water Changes
To visualize changes in surface water over time, we can create an ImageCollection of visualized images and use `Export.video.toDrive()` function to exported a video animation. We use Gennadii Donchyts's excellent [`text` package](https://github.com/gee-community/ee-packages-js) for adding text overlay on the images. The exported video can be converted to an animated GIF using https://ezgif.com/.
```{r echo=FALSE, fig.align='center', out.width='80%', fig.cap='Video Animation'}
knitr::include_graphics('images/gee_water_resources_management/surface_water_animation.gif')
```
[Open in Code Editor ↗](https://code.earthengine.google.co.in/?scriptPath=users%2Fujavalgandhi%2FGEE-Water-Resources-Management%3ASupplement%2FSurface_Water%2FSurface_Water_Animation){target="_blank"}
```{js eval=FALSE, code=readLines('code/gee_water_resources_management/Supplement/Surface_Water/Surface_Water_Animation')}
```
## Detecting Algal Blooms
[Open in Code Editor ↗](https://code.earthengine.google.co.in/?scriptPath=users%2Fujavalgandhi%2FGEE-Water-Resources-Management%3ASupplement%2FSurface_Water%2FDetecting_Algae_Blooms){target="_blank"}
```{js eval=FALSE, code=readLines('code/gee_water_resources_management/Supplement/Surface_Water/Detecting_Algae_Blooms')}
```
## Detect First Year of Water
[Open in Code Editor ↗](https://code.earthengine.google.com/?scriptPath=users%2Fujavalgandhi%2FGEE-Water-Resources-Management%3ASupplement%2FSurface_Water%2FDetect_First_Year_of_Water){target="_blank"}
```{js eval=FALSE, code=readLines('code/gee_water_resources_management/Supplement/Surface_Water/Detect_First_Year_of_Water')}
```
## Otsu Dynamic Thresholding
[Open in Code Editor ↗](https://code.earthengine.google.com/?scriptPath=users%2Fujavalgandhi%2FGEE-Water-Resources-Management%3ASupplement%2FSurface_Water%2FOtsu_Dynamic_Thresholding){target="_blank"}
```{js eval=FALSE, code=readLines('code/gee_water_resources_management/Supplement/Surface_Water/Otsu_Dynamic_Thresholding')}
```
## Smoothing Vectors
[Open in Code Editor ↗](https://code.earthengine.google.com/?scriptPath=users%2Fujavalgandhi%2FGEE-Water-Resources-Management%3ASupplement%2FSurface_Water%2FSmoothing_Vectors){target="_blank"}
```{js eval=FALSE, code=readLines('code/gee_water_resources_management/Supplement/Surface_Water/Smoothing_Vectors')}
```
## Surface Water Explorer Split Panel App
[Open in Code Editor ↗](https://code.earthengine.google.com/?scriptPath=users%2Fujavalgandhi%2FGEE-Water-Resources-Management%3ASupplement%2FSurface_Water%2FSurface_Water_Explorer_Split_Panel_App){target="_blank"}
```{js eval=FALSE, code=readLines('code/gee_water_resources_management/Supplement/Surface_Water/Surface_Water_Explorer_Split_Panel_App')}
```
## Unsupervised Clustering
[Open in Code Editor ↗](https://code.earthengine.google.com/?scriptPath=users%2Fujavalgandhi%2FGEE-Water-Resources-Management%3ASupplement%2FSurface_Water%2FUnsupervised_Clustering){target="_blank"}
```{js eval=FALSE, code=readLines('code/gee_water_resources_management/Supplement/Surface_Water/Unsupervised_Clustering')}
```
# SAR
## Sentinel-1 ARD Pre-Processing
This example script shows how to apply a Gamma MAP (Maximum A-posterior) Speckle Filter and Radiometric Terrain Correction to Sentinel-1 images using the Analysis Ready Data (ARD) preparation framework published by Mullissa, A. et. al.
```{r echo=FALSE, fig.align='center', out.width='100%', fig.cap='Gamma MAP Speckle filtering'}
knitr::include_graphics('images/gee_water_resources_management/gamma_map.png')
```
[Open in Code Editor ↗](https://code.earthengine.google.com/?scriptPath=users%2Fujavalgandhi%2FGEE-Water-Resources-Management%3ASupplement%2FSAR%2FS1_ARD_Preprocessing){target="_blank"}
```{js eval=FALSE, code=readLines('code/gee_water_resources_management/Supplement/SAR/S1_ARD_Preprocessing')}
```
## SAR Water Detection
[Open in Code Editor ↗](https://code.earthengine.google.co.in/?scriptPath=users%2Fujavalgandhi%2FGEE-Water-Resources-Management%3ASupplement%2FSAR%2FSAR_Water_Detection){target="_blank"}
```{js eval=FALSE, code=readLines('code/gee_water_resources_management/Supplement/SAR/SAR_Water_Detection')}
```
# Time Series Analysis
## Mann Kendall Test
[Open in Code Editor ↗](https://code.earthengine.google.com/?scriptPath=users%2Fujavalgandhi%2FGEE-Water-Resources-Management%3ASupplement%2FTime_Series_Analysis%2FMann_Kendall_Test){target="_blank"}
```{js eval=FALSE, code=readLines('code/gee_water_resources_management/Supplement/Time_Series_Analysis/Mann_Kendall_Test')}
```
# License
The course material (text, images, presentation, videos) is licensed under a [Creative Commons Attribution 4.0 International License](https://creativecommons.org/licenses/by/4.0/).
The code (scripts, Jupyter notebooks) is licensed under the MIT License. For a copy, see https://opensource.org/licenses/MIT
Kindly give appropriate credit to the original author as below:
Copyright © 2021 Ujaval Gandhi [www.spatialthoughts.com](https://spatialthoughts.com)
# Citing and Referencing
You can cite the course materials as follows
* Gandhi, Ujaval, 2021. *Google Earth Engine for Water Resources Management* Course. Spatial Thoughts. https://courses.spatialthoughts.com/gee-water-resources-management.html
***
**This course is offered as an instructor-led online class. Visit [Spatial Thoughts](https://spatialthoughts.com/events/) to know details of upcoming sessions.**