-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathgee-introduction.Rmd
387 lines (233 loc) · 14.1 KB
/
gee-introduction.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
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
---
title: "Introduction to Google Earth Engine (Full Workshop)"
subtitle: "A Hands-on workshop to get started with GEE."
author: "Ujaval Gandhi"
fontsize: 12pt
output:
# pdf_document:
# latex_engine: xelatex
# toc: yes
# toc_depth: 3
# fig_caption: false
# word_document:
# toc: false
# fig_caption: false
html_document:
df_print: paged
highlight: pygments
includes:
after_body: comment.html
toc: yes
toc_depth: 1
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='75%', out.width='250pt'}
knitr::include_graphics('images/spatial_thoughts_logo.png')
```
***
<!--- Install package vembedr to get YouTube videos rendered -->
```{r echo=FALSE}
suppressWarnings(library("vembedr"))
```
\newpage
# Introduction
This 5-hour hands-on workshop is designed to help participants learn the basics of the Google Earth Engine platform. This beginner-friendly class covers a range of topics to help participants get comfortable with the Code Editor environment and the Google Earth Engine API to implement remote sensing workflows. During the workshop, you will learn how to load, filter, analyze, and export datasets from the Earth Engine Data Catalog. The workshop also covers Map/Reduce programming concepts so you can scale your analysis to large regions and work with time-series data.
Pre-requisites:
* Familiarity with remote sensing datasets and concepts is helpful but not required.
* **No programming background or experience is required.**
```{r echo=FALSE}
embed_url('https://www.youtube.com/watch?v=K5GTY9sGe5Y&t=28')
```
[![View Presentation](images/gee_introduction/workshop_overview.png){width="400px"}](https://docs.google.com/presentation/d/1wCinjis7AnC_-yYlMBq2PH94mdHWkZvJQr2Il6MY4Sk/edit?usp=sharing){target="_blank"}
[View the Presentation ↗](https://docs.google.com/presentation/d/1wCinjis7AnC_-yYlMBq2PH94mdHWkZvJQr2Il6MY4Sk/edit?usp=sharing){target="_blank"}
# Setting up the Environment
## Sign-up for Google Earth Engine
If you already have a Google Earth Engine account, you can skip this step.
Visit our [GEE Sign-Up Guide](gee-sign-up.html) for step-by-step instructions.
## Get the Course Materials
The course material and exercises are in the form of Earth Engine scripts shared via a code repository.
1. [Click this link](https://code.earthengine.google.co.in/?accept_repo=users/ujavalgandhi/GEE-Introduction) to open Google Earth Engine code editor and add the repository to your account.
2. If successful, you will have a new repository named `users/ujavalgandhi/GEE-Introduction` in the *Scripts* tab in the *Reader* section.
3. Verify that your code editor looks like below
```{r echo=FALSE, fig.align='center', out.width='50%', fig.cap='Code Editor After Adding the Workshop Repository'}
knitr::include_graphics('images/gee_introduction/repository.png')
```
If you do not see the repository in the *Reader* section, click *Refresh repository cache* button in your *Scripts* tab and it will show up.
## Get the Course Videos
The course is accompanied by a set of professionally edited videos recorded during Geo For Good 2023 conference and available via the Google Earth YouTube channel. [Access the YouTube Playlist ↗](https://youtube.com/playlist?list=PLLW-qoCMKQsx62nKon2-0PMtGzkxlwN7k&si=XCRHqWjqNsQkkCBu){target="_blank"}
\newpage
# Part 1: Data Discovery, Processing and Export
## 01. Hello World
```{r echo=FALSE}
embed_url('https://www.youtube.com/watch?v=9ziem4rjNB8')
```
[Open in Code Editor ↗](https://code.earthengine.google.co.in/?scriptPath=users%2Fujavalgandhi%2FGEE-Introduction%3APart_01%2F01b_Hello_World_(complete)){target="_blank"}
```{js eval=FALSE, code=readLines('code/gee_introduction/Part_01/01b_Hello_World_(complete)')}
```
### Exercise
[Try in Code Editor ↗](https://code.earthengine.google.co.in/?scriptPath=users%2Fujavalgandhi%2FGEE-Introduction%3APart_01%2F01c_Hello_World_(exercise)){target="_blank"}
```{js eval=FALSE, code=readLines('code/gee_introduction/Part_01/01c_Hello_World_(exercise)')}
```
## 02. ImageCollections
```{r echo=FALSE}
embed_url('https://www.youtube.com/watch?v=A0alcolq9tc')
```
[Open in Code Editor ↗](https://code.earthengine.google.co.in/?scriptPath=users%2Fujavalgandhi%2FGEE-Introduction%3APart_01%2F02b_Image_Collections_(complete)){target="_blank"}
```{js eval=FALSE, code=readLines('code/gee_introduction/Part_01/02b_Image_Collections_(complete)')}
```
### Exercise
[Try in Code Editor ↗](https://code.earthengine.google.co.in/?scriptPath=users%2Fujavalgandhi%2FGEE-Introduction%3APart_01%2F02c_Image_Collections_(exercise)){target="_blank"}
```{js eval=FALSE, code=readLines('code/gee_introduction/Part_01/02c_Image_Collections_(exercise)')}
```
## 03. Filtering ImageCollections
```{r echo=FALSE}
embed_url('https://www.youtube.com/watch?v=8sPY5PW31L0')
```
[Open in Code Editor ↗](https://code.earthengine.google.co.in/?scriptPath=users%2Fujavalgandhi%2FGEE-Introduction%3APart_01%2F03b_Filtering_Image_Collection_(complete)){target="_blank"}
```{js eval=FALSE, code=readLines('code/gee_introduction/Part_01/03b_Filtering_Image_Collection_(complete)')}
```
### Exercise
[Try in Code Editor ↗](https://code.earthengine.google.co.in/?scriptPath=users%2Fujavalgandhi%2FGEE-Introduction%3APart_01%2F03c_Filtering_Image_Collection_(exercise)){target="_blank"}
```{js eval=FALSE, code=readLines('code/gee_introduction/Part_01/03c_Filtering_Image_Collection_(exercise)')}
```
## 04. Mosaics and Composites
```{r echo=FALSE}
embed_url('https://www.youtube.com/watch?v=GXklbpAn8Dw')
```
[Open in Code Editor ↗](https://code.earthengine.google.co.in/?scriptPath=users%2Fujavalgandhi%2FGEE-Introduction%3APart_01%2F04b_Mosaics_and_Composites_(complete)){target="_blank"}
```{js eval=FALSE, code=readLines('code/gee_introduction/Part_01/04b_Mosaics_and_Composites_(complete)')}
```
### Exercise
[Try in Code Editor ↗](https://code.earthengine.google.co.in/?scriptPath=users%2Fujavalgandhi%2FGEE-Introduction%3APart_01%2F04c_Mosaics_and_Composites_(exercise)){target="_blank"}
```{js eval=FALSE, code=readLines('code/gee_introduction/Part_01/04c_Mosaics_and_Composites_(exercise)')}
```
## 05. FeatureCollections
```{r echo=FALSE}
embed_url('https://www.youtube.com/watch?v=5roLwHUYh1g')
```
[Open in Code Editor ↗](https://code.earthengine.google.co.in/?scriptPath=users%2Fujavalgandhi%2FGEE-Introduction%3APart_01%2F05b_Feature_Collections_(complete)){target="_blank"}
```{js eval=FALSE, code=readLines('code/gee_introduction/Part_01/05b_Feature_Collections_(complete)')}
```
### Exercise
[Try in Code Editor ↗](https://code.earthengine.google.co.in/?scriptPath=users%2Fujavalgandhi%2FGEE-Introduction%3APart_01%2F05c_Feature_Collections_(exercise)){target="_blank"}
```{js eval=FALSE, code=readLines('code/gee_introduction/Part_01/05c_Feature_Collections_(exercise)')}
```
## 06. Clipping
```{r echo=FALSE}
embed_url('https://www.youtube.com/watch?v=6BqO_wxB0ZU')
```
[Open in Code Editor ↗](https://code.earthengine.google.co.in/?scriptPath=users%2Fujavalgandhi%2FGEE-Introduction%3APart_01%2F06b_Clipping_(complete)){target="_blank"}
```{js eval=FALSE, code=readLines('code/gee_introduction/Part_01/06b_Clipping_(complete)')}
```
### Exercise
[Try in Code Editor ↗](https://code.earthengine.google.co.in/?scriptPath=users%2Fujavalgandhi%2FGEE-Introduction%3APart_01%2F06c_Clipping_(exercise)){target="_blank"}
```{js eval=FALSE, code=readLines('code/gee_introduction/Part_01/06c_Clipping_(exercise)')}
```
## 07. Export
```{r echo=FALSE}
embed_url('https://www.youtube.com/watch?v=7wYKd0_iFVw')
```
[Open in Code Editor ↗](https://code.earthengine.google.co.in/?scriptPath=users%2Fujavalgandhi%2FGEE-Introduction%3APart_01%2F07b_Export_(complete)){target="_blank"}
```{js eval=FALSE, code=readLines('code/gee_introduction/Part_01/07b_Export_(complete)')}
```
### Exercise
[Try in Code Editor ↗](https://code.earthengine.google.co.in/?scriptPath=users%2Fujavalgandhi%2FGEE-Introduction%3APart_01%2F07c_Export_(exercise)){target="_blank"}
```{js eval=FALSE, code=readLines('code/gee_introduction/Part_01/07c_Export_(exercise)')}
```
## Quiz 1
Take the short online quiz to recap your understanding of Part-1 of the workshop.
[Launch Quiz-1 ↗](https://forms.gle/UBAKJ4yK3zCRHa5u5){target="_blank"}.
----
\newpage
# Part 2: Computation in Earth Engine
## 01. Calculating Indices
```{r echo=FALSE}
embed_url('https://www.youtube.com/watch?v=7qj07TRbY10')
```
[Open in Code Editor ↗](https://code.earthengine.google.co.in/?scriptPath=users%2Fujavalgandhi%2FGEE-Introduction%3APart_02%2F01b_Calculating_Indices_(complete)){target="_blank"}
```{js eval=FALSE, code=readLines('code/gee_introduction/Part_02/01b_Calculating_Indices_(complete)')}
```
### Exercise
[Try in Code Editor ↗](https://code.earthengine.google.co.in/?scriptPath=users%2Fujavalgandhi%2FGEE-Introduction%3APart_02%2F01c_Calculating_Indices_(exercise)){target="_blank"}
```{js eval=FALSE, code=readLines('code/gee_introduction/Part_02/01c_Calculating_Indices_(exercise)')}
```
## 02. Computation on ImageCollections
```{r echo=FALSE}
embed_url('https://www.youtube.com/watch?v=h_jxVUDPwSQ')
```
[Open in Code Editor ↗](https://code.earthengine.google.co.in/?scriptPath=users%2Fujavalgandhi%2FGEE-Introduction%3APart_02%2F02b_Computation_on_Image_Collections_(complete)){target="_blank"}
```{js eval=FALSE, code=readLines('code/gee_introduction/Part_02/02b_Computation_on_Image_Collections_(complete)')}
```
### Exercise
[Try in Code Editor ↗](https://code.earthengine.google.co.in/?scriptPath=users%2Fujavalgandhi%2FGEE-Introduction%3APart_02%2F02c_Computation_on_Image_Collections_(exercise)){target="_blank"}
```{js eval=FALSE, code=readLines('code/gee_introduction/Part_02/02c_Computation_on_Image_Collections_(exercise)')}
```
## 03. Reducing ImageCollections
```{r echo=FALSE}
embed_url('https://www.youtube.com/watch?v=DJ398IQcMt0')
```
[Open in Code Editor ↗](https://code.earthengine.google.co.in/?scriptPath=users%2Fujavalgandhi%2FGEE-Introduction%3APart_02%2F03b_Reducing_Image_Collections_(complete)){target="_blank"}
```{js eval=FALSE, code=readLines('code/gee_introduction/Part_02/03b_Reducing_Image_Collections_(complete)')}
```
### Exercise
[Try in Code Editor ↗](https://code.earthengine.google.co.in/?scriptPath=users%2Fujavalgandhi%2FGEE-Introduction%3APart_02%2F03c_Reducing_Image_Collections_(exercise)){target="_blank"}
```{js eval=FALSE, code=readLines('code/gee_introduction/Part_02/03c_Reducing_Image_Collections_(exercise)')}
```
## 04. Reducing Images
```{r echo=FALSE}
embed_url('https://www.youtube.com/watch?v=4QkZwNvI7W8')
```
[Open in Code Editor ↗](https://code.earthengine.google.co.in/?scriptPath=users%2Fujavalgandhi%2FGEE-Introduction%3APart_02%2F04b_Reducing_Images_(complete)){target="_blank"}
```{js eval=FALSE, code=readLines('code/gee_introduction/Part_02/04b_Reducing_Images_(complete)')}
```
### Exercise
[Try in Code Editor ↗](https://code.earthengine.google.co.in/?scriptPath=users%2Fujavalgandhi%2FGEE-Introduction%3APart_02%2F04c_Reducing_Images_(exericse)){target="_blank"}
```{js eval=FALSE, code=readLines('code/gee_introduction/Part_02/04c_Reducing_Images_(exericse)')}
```
## 05. Time-Series Charts
```{r echo=FALSE}
embed_url('https://www.youtube.com/watch?v=1vF3lrMFetQ')
```
[Open in Code Editor ↗](https://code.earthengine.google.co.in/?scriptPath=users%2Fujavalgandhi%2FGEE-Introduction%3APart_02%2F05b_Time_Series_Charts_(complete)){target="_blank"}
```{js eval=FALSE, code=readLines('code/gee_introduction/Part_02/05b_Time_Series_Charts_(complete)')}
```
### Exercise
[Try in Code Editor ↗](https://code.earthengine.google.co.in/?scriptPath=users%2Fujavalgandhi%2FGEE-Introduction%3APart_02%2F05c_Time_Series_Charts_(exercise)){target="_blank"}
```{js eval=FALSE, code=readLines('code/gee_introduction/Part_02/05c_Time_Series_Charts_(exercise)')}
```
## Quiz 2
Take the short online quiz to recap your understanding of Part-2 of the workshop.
[Launch Quiz-2 ↗](https://forms.gle/mTCEH26kWzjGUvYb8){target="_blank"}.
# Learning Resources
```{r echo=FALSE}
embed_url('https://www.youtube.com/watch?v=Rn1zl_FckMM')
```
* [Google Earth Engine User Guide](https://developers.google.com/earth-engine/)
* [Cloud-Based Remote Sensing with Google Earth Engine: Fundamentals and Applications](https://www.eefabook.org/): A free and open-access book with 55-chapters covering fundamentals and applications of GEE. Also includes YouTube videos summarizing each chapter.
* [Spatial Thoughts OpenCourseWare](https://courses.spatialthoughts.com/)
* End-to-End Google Earth Engine
* Google Earth Engine for Water Resources Management
* Creating Publication Quality Charts with GEE
* Earth Engine Advanced Concepts
# Data Credits
* **Sentinel-2 Level-1C, Level-2A** and **Sentinel-1 SAR GRD**: Contains Copernicus Sentinel data.
* **FAO GAUL 500m: Global Administrative Unit Layers 2015, Second-Level Administrative Units**: Source of Administrative boundaries: The Global Administrative Unit Layers (GAUL) dataset,
implemented by FAO within the CountrySTAT and Agricultural Market Information System
(AMIS) projects.
# 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 © 2023 Ujaval Gandhi [www.spatialthoughts.com](https://spatialthoughts.com)
# Citing and Referencing
You can cite the course materials as follows
* Gandhi, Ujaval, 2023. *Introduction to Google Earth Engine* workshop. Spatial Thoughts. https://courses.spatialthoughts.com/end-to-end-gee.html
***