forked from jorisvandenbossche/DS-python-geospatial
/
slides.html
executable file
·390 lines (246 loc) · 8.89 KB
/
slides.html
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
388
389
390
<!DOCTYPE html>
<html>
<head>
<title>Title</title>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="img/slides.css">
<!--
<link rel="stylesheet" href="./img/font-awesome-4.7.0/css/font-awesome.min.css">
<style>
@import url(https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz);
@import url(https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic);
@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700,400italic);
body { font-family: 'Droid Serif'; }
h1, h2, h3 {
font-family: 'Yanone Kaffeesatz';
font-weight: normal;
}
.remark-code, .remark-inline-code { font-family: 'Ubuntu Mono'; }
#slideshow .slide .content .cols.two .col { width: 48%; }
</style>
-->
<style>
.section_background {background-color:#c2c444; color: #fff}
.day_background {background-color:#ececec; color: #000}
</style>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});
</script>
<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
</head>
<body>
<textarea id="source">
class: center, middle
# Python for GIS and Geoscience
Specialist course Doctoral schools of Ghent University,<br>
5-6-8 October 2020
Joris Van den Bossche, Stijn Van Hoey
https://github.com/jorisvandenbossche/DS-python-geospatial
---
### Joris Van den Bossche
<a href="https://twitter.com/jorisvdbossche"><i class="fa fa-twitter" aria-hidden="true"></i> jorisvdbossche</a>,
<a href="https://github.com/jorisvandenbossche"><i class="fa fa-github" aria-hidden="true"></i> jorisvandenbossche</a><br>
* Open source software developer and teacher
* Pandas, GeoPandas, scikit-learn, Apache Arrow
---
### Stijn Van Hoey
<a href="https://twitter.com/svanhoey"><i class="fa fa-twitter" aria-hidden="true"></i> SVanHoey</a>,
<a href="https://github.com/stijnvanhoey"><i class="fa fa-github" aria-hidden="true"></i> stijnvanhoey</a>
* Research software engineer
.center[
![:scale 90%](./img/work_stijn_1.png)]
---
class: middle, section_background
# Setting up a working environment
---
## Setting up a working environment
For the setup instructions, see the [setup page](https://jorisvandenbossche.github.io/DS-python-geospatial/setup.html).
---
class: center, middle
When you see something like this...
![:scale 100%](./img/startup.png)
...relax, you're ready to start!
---
class: center, middle
![:scale 100%](https://i.ytimg.com/vi/PlaYMh-u-2w/maxresdefault.jpg)
---
class: center, middle
# Why python?
---
class: center, middle
# Python is...
---
## …WIDESPREAD
* Large world-wide community ensures **fast development**
* Used in **scientific** and non-scientific institutes <br> (Google, NASA, ESRI, VMM,...)
* Python is a standard in **GIS** <br> (commercial and non-commercial tools)
* **Multiplatform** (linux, windows,…)
---
## …REPRODUCIBLE
.center[
instead of
> *what did you/I clicked a few months ago?’-style WYSISYG*
]
--
## …MULTI-FUNCTIONAL
* Research and development: the python *scientific ecosystem*
* Webdevelopment (Django, Flask)
* Daily use: great as ducttape/glue
* **Automation** of time-consuming returning tasks
--
## …OPEN SOURCE
* No license costs!
---
## ...SO WHAT? The Holy Grail ? No!
* Commercial packages give specific support and more direct help-functions (cfr. MATLAB)
* Commercial packages can be more client-friendly
* For hard number-crunching stuff, NOT the fastest solution
* R, Fortran, C++ etc are also ‘widespread’, so python is just a language amongst the others
* Risk of getting lost in the forest/flood of ‘useful packages’
---
# Conda
### Why using conda?
- Consistent package manager across Windows, Mac and Linux
- Many precompiled packages available
- Less problems with installation
--
### Why different environments?
- Manage the dependencies of a specific project/paper/group/...
- You can install different version of Python and other packages alongside on your computer
- Easily share environments with other
---
## Small overview of conda commands
Creating a new environment:
```
conda create -n my_env python=3.7 pandas
# or from environment file
conda env create -f environment.yml
```
Activating an environment:
```
conda activate my_env
```
Install a new package:
```
conda install matplotlib # if not working, try: pip install ...
```
List all installed packages: `conda list`
List all your environments: `conda info -e`
See the docs: http://conda.pydata.org/docs/using/index.html
---
class: center, middle
### Keep track of your python ecosystem <br>with an `environment.yml`
<br><br>
```
conda env export > environment.yml
```
---
class: middle, section_background
# Working with Python
---
## IPython console
<br>
.center[![:scale 75%](./img/ipython.png)]
---
## Interactive Development Environment (IDE)
* [**Spyder**](https://pythonhosted.org/spyder/) is shipped with Anaconda. The familiar environment for Matlab/Rstudio-users...
* [**PyCharm**](https://www.jetbrains.com/pycharm/): Popular for web-development and Django applications, powerful when doing 'real' development (packages, libraries, software)
* [Eclipse + **pyDev plugin**](http://www.pydev.org/): If you like working in Eclipse, just add the python environment
* [**VS Code**](https://code.visualstudio.com/), [**Atom**](https://atom.io/), ...
---
## Jupyter Notebook
<small>(*previously called IPython notebook*)</small>
**Jupyter notebook** provides an **interactive** scripting environment,<br> ideal for exploration, prototyping,...
.center[![:scale 70%](./img/notebook.png)]
--
...the stuff we're dealing with in this course!
---
class: middle, day_background
# Overview of the first day
...
---
class: middle, center
ask for help
__TODO__
---
class: middle, center
INTRO TO COURSE/CHAT/... SETUP
__TODO__
---
class: middle, center
![:scale 80%](./img/issuetracker.png)
Report bugs, typo's, suggestions... as issues ([New issue](https://github.com/jorisvandenbossche/DS-python-geospatial/issues/new))
or see the [contributing guidelines](https://github.com/jorisvandenbossche/DS-python-geospatial/blob/master/CONTRIBUTING.md)
---
class: middle, day_background
# Overview of the second day
__TODO__
---
class: middle
## Continue with *case study XX:* TODO
---
class: middle, day_background
# Overview of the third day
__TODO__
---
class: center, middle
# How are you feeling?
![:scale 100%](http://esq.h-cdn.co/assets/15/51/980x490/landscape-1450137389-john-cleese.JPG)
### https://forms.gle/S6ZaJrabvRGpsnsRA
__TODO__ ADJUST URL
Please fill in the questionnaire!
---
class: center, middle
# Closing notes
---
class: center, middle
# Python's scientific/GIS ecosystem
#### ## Adjusted from figure by Jake VanderPlas
__TODO__ Adjust with https://github.com/stijnvanhoey/course_gis_scripting/tree/master/docs/img
---
class: center, middle, bgheader
background-image: url(./img/ecosystem-gis-overview.svg)
background-size: cover
---
# A rich ecosystem of packages:
<br>
**Machine learning**: scikit-learn, tensorflow, pytorch, keras, chainer, ...
**Performance**: Numba, Cython, Numexpr, Pythran, C/Fortran wrappers, ...
**Visualisation**: Bokeh, Seaborn, Plotnine, Altair, Plotly, Mayavi, HoloViews, datashader, vaex ...
**Data structures and parallel/distributed computation**: Xarray, Dask, Distributed, Cupy, ...
Specialized packages in many **scientific fields**: astronomy, natural language processing, image processing, geospatial, ...
**Packaging and distribution**: pip/wheels, conda, Anaconda, Canopy, ...
---
class: center, middle
### Reading advice
[Good Enough Practices in Scientific Computing](https://arxiv.org/pdf/1609.00037v1.pdf)
> "*However, while most scientists are careful to validate their laboratory and field equipment, most do not know how reliable their software is*"
---
class: center, middle
## Good luck!
![](http://www.backwaterreptiles.com/images/pythons/angolan-python-for-sale.jpg)
</textarea>
<!-- <script src="https://gnab.github.io/remark/downloads/remark-latest.min.js">
</script>-->
<script src="img/remark.min.js" type="text/javascript">
</script>
<script>
var slideshow = remark.create();
</script>
<script>
remark.macros.scale = function (percentage) {
var url = this;
return '<img src="' + url + '" style="width: ' + percentage + '" />';
};
var slideshow = remark.create();
</script>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!-- Latest compiled JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</body>
</html>