forked from ENV859/ScientificComputing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.html
366 lines (339 loc) · 25.8 KB
/
README.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
<!doctype html>
<html>
<head>
<meta charset='UTF-8'><meta name='viewport' content='width=device-width initial-scale=1'>
<style type='text/css'>html {overflow-x: initial !important;}:root { --bg-color:#ffffff; --text-color:#333333; --select-text-bg-color:#B5D6FC; --select-text-font-color:auto; --monospace:"Lucida Console",Consolas,"Courier",monospace; --title-bar-height:20px; }
.mac-os-11 { --title-bar-height:28px; }
html { font-size: 14px; background-color: var(--bg-color); color: var(--text-color); font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
body { margin: 0px; padding: 0px; height: auto; inset: 0px; font-size: 1rem; line-height: 1.42857; overflow-x: hidden; background: inherit; tab-size: 4; }
iframe { margin: auto; }
a.url { word-break: break-all; }
a:active, a:hover { outline: 0px; }
.in-text-selection, ::selection { text-shadow: none; background: var(--select-text-bg-color); color: var(--select-text-font-color); }
#write { margin: 0px auto; height: auto; width: inherit; word-break: normal; overflow-wrap: break-word; position: relative; white-space: normal; overflow-x: visible; padding-top: 36px; }
#write.first-line-indent p { text-indent: 2em; }
#write.first-line-indent li p, #write.first-line-indent p * { text-indent: 0px; }
#write.first-line-indent li { margin-left: 2em; }
.for-image #write { padding-left: 8px; padding-right: 8px; }
body.typora-export { padding-left: 30px; padding-right: 30px; }
.typora-export .footnote-line, .typora-export li, .typora-export p { white-space: pre-wrap; }
.typora-export .task-list-item input { pointer-events: none; }
@media screen and (max-width: 500px) {
body.typora-export { padding-left: 0px; padding-right: 0px; }
#write { padding-left: 20px; padding-right: 20px; }
.CodeMirror-sizer { margin-left: 0px !important; }
.CodeMirror-gutters { display: none !important; }
}
#write li > figure:last-child { margin-bottom: 0.5rem; }
#write ol, #write ul { position: relative; }
img { max-width: 100%; vertical-align: middle; image-orientation: from-image; }
button, input, select, textarea { color: inherit; font: inherit; }
input[type="checkbox"], input[type="radio"] { line-height: normal; padding: 0px; }
*, ::after, ::before { box-sizing: border-box; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p, #write pre { width: inherit; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p { position: relative; }
p { line-height: inherit; }
h1, h2, h3, h4, h5, h6 { break-after: avoid-page; break-inside: avoid; orphans: 4; }
p { orphans: 4; }
h1 { font-size: 2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.4rem; }
h5 { font-size: 1.2rem; }
h6 { font-size: 1rem; }
.md-math-block, .md-rawblock, h1, h2, h3, h4, h5, h6, p { margin-top: 1rem; margin-bottom: 1rem; }
.hidden { display: none; }
.md-blockmeta { color: rgb(204, 204, 204); font-weight: 700; font-style: italic; }
a { cursor: pointer; }
sup.md-footnote { padding: 2px 4px; background-color: rgba(238, 238, 238, 0.7); color: rgb(85, 85, 85); border-radius: 4px; cursor: pointer; }
sup.md-footnote a, sup.md-footnote a:hover { color: inherit; text-transform: inherit; text-decoration: inherit; }
#write input[type="checkbox"] { cursor: pointer; width: inherit; height: inherit; }
figure { overflow-x: auto; margin: 1.2em 0px; max-width: calc(100% + 16px); padding: 0px; }
figure > table { margin: 0px; }
tr { break-inside: avoid; break-after: auto; }
thead { display: table-header-group; }
table { border-collapse: collapse; border-spacing: 0px; width: 100%; overflow: auto; break-inside: auto; text-align: left; }
table.md-table td { min-width: 32px; }
.CodeMirror-gutters { border-right: 0px; background-color: inherit; }
.CodeMirror-linenumber { user-select: none; }
.CodeMirror { text-align: left; }
.CodeMirror-placeholder { opacity: 0.3; }
.CodeMirror pre { padding: 0px 4px; }
.CodeMirror-lines { padding: 0px; }
div.hr:focus { cursor: none; }
#write pre { white-space: pre-wrap; }
#write.fences-no-line-wrapping pre { white-space: pre; }
#write pre.ty-contain-cm { white-space: normal; }
.CodeMirror-gutters { margin-right: 4px; }
.md-fences { font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; overflow: visible; white-space: pre; background: inherit; position: relative !important; }
.md-fences-adv-panel { width: 100%; margin-top: 10px; text-align: center; padding-top: 0px; padding-bottom: 8px; overflow-x: auto; }
#write .md-fences.mock-cm { white-space: pre-wrap; }
.md-fences.md-fences-with-lineno { padding-left: 0px; }
#write.fences-no-line-wrapping .md-fences.mock-cm { white-space: pre; overflow-x: auto; }
.md-fences.mock-cm.md-fences-with-lineno { padding-left: 8px; }
.CodeMirror-line, twitterwidget { break-inside: avoid; }
.footnotes { opacity: 0.8; font-size: 0.9rem; margin-top: 1em; margin-bottom: 1em; }
.footnotes + .footnotes { margin-top: 0px; }
.md-reset { margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: top; background: 0px 0px; text-decoration: none; text-shadow: none; float: none; position: static; width: auto; height: auto; white-space: nowrap; cursor: inherit; -webkit-tap-highlight-color: transparent; line-height: normal; font-weight: 400; text-align: left; box-sizing: content-box; direction: ltr; }
li div { padding-top: 0px; }
blockquote { margin: 1rem 0px; }
li .mathjax-block, li p { margin: 0.5rem 0px; }
li blockquote { margin: 1rem 0px; }
li { margin: 0px; position: relative; }
blockquote > :last-child { margin-bottom: 0px; }
blockquote > :first-child, li > :first-child { margin-top: 0px; }
.footnotes-area { color: rgb(136, 136, 136); margin-top: 0.714rem; padding-bottom: 0.143rem; white-space: normal; }
#write .footnote-line { white-space: pre-wrap; }
@media print {
body, html { border: 1px solid transparent; height: 99%; break-after: avoid; break-before: avoid; font-variant-ligatures: no-common-ligatures; }
#write { margin-top: 0px; padding-top: 0px; border-color: transparent !important; }
.typora-export * { -webkit-print-color-adjust: exact; }
.typora-export #write { break-after: avoid; }
.typora-export #write::after { height: 0px; }
.is-mac table { break-inside: avoid; }
.typora-export-show-outline .typora-export-sidebar { display: none; }
}
.footnote-line { margin-top: 0.714em; font-size: 0.7em; }
a img, img a { cursor: pointer; }
pre.md-meta-block { font-size: 0.8rem; min-height: 0.8rem; white-space: pre-wrap; background: rgb(204, 204, 204); display: block; overflow-x: hidden; }
p > .md-image:only-child:not(.md-img-error) img, p > img:only-child { display: block; margin: auto; }
#write.first-line-indent p > .md-image:only-child:not(.md-img-error) img { left: -2em; position: relative; }
p > .md-image:only-child { display: inline-block; width: 100%; }
#write .MathJax_Display { margin: 0.8em 0px 0px; }
.md-math-block { width: 100%; }
.md-math-block:not(:empty)::after { display: none; }
.MathJax_ref { fill: currentcolor; }
[contenteditable="true"]:active, [contenteditable="true"]:focus, [contenteditable="false"]:active, [contenteditable="false"]:focus { outline: 0px; box-shadow: none; }
.md-task-list-item { position: relative; list-style-type: none; }
.task-list-item.md-task-list-item { padding-left: 0px; }
.md-task-list-item > input { position: absolute; top: 0px; left: 0px; margin-left: -1.2em; margin-top: calc(1em - 10px); border: none; }
.math { font-size: 1rem; }
.md-toc { min-height: 3.58rem; position: relative; font-size: 0.9rem; border-radius: 10px; }
.md-toc-content { position: relative; margin-left: 0px; }
.md-toc-content::after, .md-toc::after { display: none; }
.md-toc-item { display: block; color: rgb(65, 131, 196); }
.md-toc-item a { text-decoration: none; }
.md-toc-inner:hover { text-decoration: underline; }
.md-toc-inner { display: inline-block; cursor: pointer; }
.md-toc-h1 .md-toc-inner { margin-left: 0px; font-weight: 700; }
.md-toc-h2 .md-toc-inner { margin-left: 2em; }
.md-toc-h3 .md-toc-inner { margin-left: 4em; }
.md-toc-h4 .md-toc-inner { margin-left: 6em; }
.md-toc-h5 .md-toc-inner { margin-left: 8em; }
.md-toc-h6 .md-toc-inner { margin-left: 10em; }
@media screen and (max-width: 48em) {
.md-toc-h3 .md-toc-inner { margin-left: 3.5em; }
.md-toc-h4 .md-toc-inner { margin-left: 5em; }
.md-toc-h5 .md-toc-inner { margin-left: 6.5em; }
.md-toc-h6 .md-toc-inner { margin-left: 8em; }
}
a.md-toc-inner { font-size: inherit; font-style: inherit; font-weight: inherit; line-height: inherit; }
.footnote-line a:not(.reversefootnote) { color: inherit; }
.md-attr { display: none; }
.md-fn-count::after { content: "."; }
code, pre, samp, tt { font-family: var(--monospace); }
kbd { margin: 0px 0.1em; padding: 0.1em 0.6em; font-size: 0.8em; color: rgb(36, 39, 41); background: rgb(255, 255, 255); border: 1px solid rgb(173, 179, 185); border-radius: 3px; box-shadow: rgba(12, 13, 14, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; white-space: nowrap; vertical-align: middle; }
.md-comment { color: rgb(162, 127, 3); opacity: 0.6; font-family: var(--monospace); }
code { text-align: left; vertical-align: initial; }
a.md-print-anchor { white-space: pre !important; border-width: initial !important; border-style: none !important; border-color: initial !important; display: inline-block !important; position: absolute !important; width: 1px !important; right: 0px !important; outline: 0px !important; background: 0px 0px !important; text-decoration: initial !important; text-shadow: initial !important; }
.os-windows.monocolor-emoji .md-emoji { font-family: "Segoe UI Symbol", sans-serif; }
.md-diagram-panel > svg { max-width: 100%; }
[lang="flow"] svg, [lang="mermaid"] svg { max-width: 100%; height: auto; }
[lang="mermaid"] .node text { font-size: 1rem; }
table tr th { border-bottom: 0px; }
video { max-width: 100%; display: block; margin: 0px auto; }
iframe { max-width: 100%; width: 100%; border: none; }
.highlight td, .highlight tr { border: 0px; }
mark { background: rgb(255, 255, 0); color: rgb(0, 0, 0); }
.md-html-inline .md-plain, .md-html-inline strong, mark .md-inline-math, mark strong { color: inherit; }
.md-expand mark .md-meta { opacity: 0.3 !important; }
mark .md-meta { color: rgb(0, 0, 0); }
@media print {
.typora-export h1, .typora-export h2, .typora-export h3, .typora-export h4, .typora-export h5, .typora-export h6 { break-inside: avoid; }
}
.md-diagram-panel .messageText { stroke: none !important; }
.md-diagram-panel .start-state { fill: var(--node-fill); }
.md-diagram-panel .edgeLabel rect { opacity: 1 !important; }
.md-fences.md-fences-math { font-size: 1em; }
.md-fences-advanced:not(.md-focus) { padding: 0px; white-space: nowrap; border: 0px; }
.md-fences-advanced:not(.md-focus) { background: inherit; }
.typora-export-show-outline .typora-export-content { max-width: 1440px; margin: auto; display: flex; flex-direction: row; }
.typora-export-sidebar { width: 300px; font-size: 0.8rem; margin-top: 80px; margin-right: 18px; }
.typora-export-show-outline #write { --webkit-flex:2; flex: 2 1 0%; }
.typora-export-sidebar .outline-content { position: fixed; top: 0px; max-height: 100%; overflow: hidden auto; padding-bottom: 30px; padding-top: 60px; width: 300px; }
@media screen and (max-width: 1024px) {
.typora-export-sidebar, .typora-export-sidebar .outline-content { width: 240px; }
}
@media screen and (max-width: 800px) {
.typora-export-sidebar { display: none; }
}
.outline-content li, .outline-content ul { margin-left: 0px; margin-right: 0px; padding-left: 0px; padding-right: 0px; list-style: none; }
.outline-content ul { margin-top: 0px; margin-bottom: 0px; }
.outline-content strong { font-weight: 400; }
.outline-expander { width: 1rem; height: 1.42857rem; position: relative; display: table-cell; vertical-align: middle; cursor: pointer; padding-left: 4px; }
.outline-expander::before { content: ""; position: relative; font-family: Ionicons; display: inline-block; font-size: 8px; vertical-align: middle; }
.outline-item { padding-top: 3px; padding-bottom: 3px; cursor: pointer; }
.outline-expander:hover::before { content: ""; }
.outline-h1 > .outline-item { padding-left: 0px; }
.outline-h2 > .outline-item { padding-left: 1em; }
.outline-h3 > .outline-item { padding-left: 2em; }
.outline-h4 > .outline-item { padding-left: 3em; }
.outline-h5 > .outline-item { padding-left: 4em; }
.outline-h6 > .outline-item { padding-left: 5em; }
.outline-label { cursor: pointer; display: table-cell; vertical-align: middle; text-decoration: none; color: inherit; }
.outline-label:hover { text-decoration: underline; }
.outline-item:hover { border-color: rgb(245, 245, 245); background-color: var(--item-hover-bg-color); }
.outline-item:hover { margin-left: -28px; margin-right: -28px; border-left: 28px solid transparent; border-right: 28px solid transparent; }
.outline-item-single .outline-expander::before, .outline-item-single .outline-expander:hover::before { display: none; }
.outline-item-open > .outline-item > .outline-expander::before { content: ""; }
.outline-children { display: none; }
.info-panel-tab-wrapper { display: none; }
.outline-item-open > .outline-children { display: block; }
.typora-export .outline-item { padding-top: 1px; padding-bottom: 1px; }
.typora-export .outline-item:hover { margin-right: -8px; border-right: 8px solid transparent; }
.typora-export .outline-expander::before { content: "+"; font-family: inherit; top: -1px; }
.typora-export .outline-expander:hover::before, .typora-export .outline-item-open > .outline-item > .outline-expander::before { content: "−"; }
.typora-export-collapse-outline .outline-children { display: none; }
.typora-export-collapse-outline .outline-item-open > .outline-children, .typora-export-no-collapse-outline .outline-children { display: block; }
.typora-export-no-collapse-outline .outline-expander::before { content: "" !important; }
.typora-export-show-outline .outline-item-active > .outline-item .outline-label { font-weight: 700; }
.md-inline-math-container mjx-container { zoom: 0.95; }
body {
font-family: "Open Sans","Clear Sans","Helvetica Neue",Helvetica,Arial,sans-serif;
color: rgb(51, 51, 51);
line-height: 1.6;
}
h1 { font-size: 25px; color: #395998;}
h2 { font-size: 20px; color: #395998; margin: 1em 0em 1em 0em;}
h3 { font-size: 18px; margin: 0.6em 0em 0.2em 0em; padding-bottom: 0em;}
h4 { font-size: 14px; margin: 0.1em 0em 0.1em 0em; padding-bottom: 0em; padding-top: 0.5em}
h5 { font-size: 12px;}
p { font-size: 12px;padding: 0px; margin: 0.5em 0em 1em 0em;}
ul li, ol li {
font-size: 12px;
margin-left: 0.15em;
margin-top: 0.2em;;
margin-bottom: 0.05em;
padding-left: 0;
}
ul {
margin: 0.1em;
}
table,th,td {
font-family: -apple-system,BlinkMacSystemFont,"Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif;
font-size: 12px;
border-collapse: collapse;
#border: 1px solid black;
}
th {
padding: 0.5em;
font-weight: bold;
text-align: left;
background-color: #99999936;
}
td {
padding: 0.5em;
border-bottom: 1px solid #b6b6b6;
}
table {
display: table;
}
blockquote {
border-style: solid;
border-width: 1px;
background-color: #c4f2f4;
margin: 0em;
padding: 0.4em;
}
blockquote > p {
margin: 0.1em;
}
.nav__list {
#font-size: 12px;
}
.nav__items {
#font-size: 14px;
}
.nav__sub-title {
font-size: 14px;
color: #012169;
}
.sidebar p, .sidebar li {
font-size: 12px;
}
.greedy-nav a {
font-size: 22px;
display: block;
margin: 0 1rem;
}
/*masthead title
.site-title {
text-align: center;
line-height: 1em;
padding: 0em 1em 0em 1em;
text-shadow:
1px 1px 0 #000;
}
.masthead__inner-wrap {
padding: 0.5em 1em 0.5em 1em;
}*/
/* code block */
pre {
overflow-x: auto; /* add scrollbars to wide code blocks*/
background: #dddddd;
color:black;
border: 0px solid #999;
display: block;
padding: 3px;
line-height: 1;
white-space: pre-wrap;
white-space: -moz-pre-wrap;
white-space: -pre-wrap;
white-space: -o-pre-wrap;
word-wrap: break-word;
border: 1px;
}
div.highlighter-rouge > pre, div.highlighter-rouge pre.highlight, figure.highlight > pre, figure.highlight pre.highlight{
font-size: 12px;
background: #eeeeee;
}
p > code,
a > code,
li > code,
figcaption > code,
td > code {
padding-top: 0.0rem;
padding-bottom: 0.0rem;
background: #dddddd;
border-radius:0;
font-size: 1em;
&:before,
&:after {
letter-spacing: -0.2em;
content: "\00a0"; /* non-breaking space*/
}
}
.language-raw {
padding-left: 40px;
font-size: 11px;
}
/*Python code colors
.highlight .k, .highlight .kn{
color: #008000;
}
.highlight .s {
color: #BA2121;
}
.highlight .n, .highlight .nn {
color: black;
}
.highlight .o {
color: #AA22FF;
}
*/
</style><title>ENV859 - Scientific computing</title>
</head>
<body class='typora-export os-windows'><div class='typora-export-content'>
<div id='write' class=''><h1 id='scientific-computing-python-and-gis'><span>Scientific Computing, Python, and GIS</span></h1><h2 id='introduction'><span>Introduction</span></h2><p><span>Scientific computing (also called computational science) is all about how we humans can leverage computers to answer questions that we couldn't without them. GIS, in fact, is a good example of scientific computing as it allows us to study and analyze features across space that hard copy maps simply couldn't reveal on their own. </span></p><p><span>Scientific computing as a discipline has been active for several decades, but it has become extremely hot in the past few years, driven by convergence of several interesting trends each relating to data. First, data collectors are everywhere: from smart phones, to security cameras, to internet-enabled appliances, to swipe cards and RFIDs. Second, data storage is cheap and getting cheaper. Third, network connectivity is penetrating more and more of our globe. And fourth, computing power to process all these data keeps growing. All this means that we are flooded with data, data that could answer many interesting and relevant questions, but only if we knew how to sift, sort, summarize, transform, analyze, and synthesize the data into meaningful chunks of actionable information - i.e., the domain of scientific computing. </span></p><p><span>Another reason scientific computing has exploded in popularity is that the tools of the trade have become more accessible to the casual user. First, personal computers are as powerful as the supercomputers of yesterday, and if those machines don't cut it, we can rent vast computing power via services such as Google Cloud, Microsoft Azure, Amazon Web Services or SalesForce.com. And furthermore, scripting languages such as R and Python have become powerful, but fairly easy to use data analysis platforms - much in part to some key packages a few sharp developers have provided. </span></p><p><span>And that leads us to the topic of this session: for us to capitalize on this "data revolution", we need to learn the key tools for doing data analysis - that is tools to collect, store, manage, summarize, combine, transform, and visualize data - that exist in Python. Fortunately, just a few packages take us a long way towards that end. These include: </span><em><span>NumPy</span></em><span>, Pandas, </span><em><span>Xarray</span></em><span>, MatPlotlib, and </span><em><span>SciPy</span></em><span>.</span></p><p><span>This document describes these Python packages in enough detail to get you familiar with what it does and then points to a number of Jupyter notebooks with some hands-on exercises. </span></p><figure><table><thead><tr><th><span>Topic</span></th><th><span>Learning Objectives</span></th></tr></thead><tbody><tr><td><span>1. NumPy & NumPy Arrays</span></td><td><span>• Explain </span><strong><span>NumPy's usefulness</span></strong><span> in the Python coding world</span><br><span>• Describe the difference between a Python list and a </span><strong><span>Numpy vector</span></strong><span> </span><br><span>• Create </span><strong><span>Numpy arrays</span></strong><span> of various shapes, sizes, & values </span><br><span>• </span><strong><span>Compute statistics</span></strong><span> on NumPy arrays </span><br><span>• </span><strong><span>Convert a feature class to a Numpy array</span></strong><span> using ArcPy</span><br><span>• </span><strong><span>Convert a raster to a NumPy array</span></strong><span> using ArcPy </span><br><span>• Explain what a </span><strong><span>stacked array</span></strong><span> is an how it can be useful in spatial analysis</span></td></tr><tr><td><span>2. Exploring Data in Pandas</span></td><td><span>• Describe the basic form of a Pandas dataframe</span><br><span>• Load data from a CSV file into a dataframe</span><br><span>• View and inspect data/dataframe properties</span><br><span>• Select columns from a dataframe</span><br><span>• Generate descriptive statistics from data in a dataframe</span><br><span>• Create some basic plots in Pandas</span></td></tr><tr><td><span>3. Data Analysis in Pandas</span></td><td><span>• Calculating and updating fields</span><br><span>• Selecting data in a dataframe</span><br><span> - Selecting single rows, select rows, or row slices using </span><code>iloc</code><br><span> - Selecting rows and columns using </span><code>iloc</code><br><span> - Selecting rows and columns using </span><code>loc</code><br><span> - Selecting rows based on criteria - using </span><em><span>queries</span></em><br><span> - Selecting rows based on criteria - using </span><em><span>masks</span></em><br><span> - Updating values in selected rows/columns</span><br><span>• Grouping and aggregating data in a dataframe</span><br><span>• Transforming data with Pivot Tables</span></td></tr><tr><td><span>4. Quick Plots with Pandas</span></td><td><span>• Brief overview of plotting using Pandas</span></td></tr></tbody></table></figure><hr /><h2 id='numpy'><em><span>NumPy</span></em></h2><h3 id='what-is-numpy'><span>What is NumPy?</span></h3><ul><li><p><span>Provides a new data type - the array - which can greatly speed up certain computations.</span></p><ul><li><u><span>Example</span></u><span>: BMI from height and weight lists (</span><code>00-Intro-to-NumPy.ipynb</code><span>)</span></li><li><u><span>Intro</span></u><span>: A quick glimpse into NumPy's </span><em><span>ndarray</span></em><span> data type (</span><code>01-NumPy-101.ipynb</code><span>)</span></li></ul></li><li><p><span>Incorporated into ArcGIS now as it provides useful (and fast) tabular analysis</span></p><ul><li><u><span>Example</span></u><span>: NC HUCs (</span><code>02-Numpy-with-FeatureClasses.ipynb</code><span>)</span></li></ul></li><li><p><span>Converting rasters to NumPy arrays also allows for analysis beyond ArcGIS/ArcPy</span></p><ul><li><u><span>Example</span></u><span>: DEM -> NumPy array -> Computing TPI (</span><code>03-Using-NumPy-With-Rasters.ipynb</code><span>)</span></li></ul></li></ul><h3 id='more-on-numpy'><span>More on NumPy</span></h3><ul><li><a href='https://jakevdp.github.io/PythonDataScienceHandbook/index.html#2.-Introduction-to-NumPy' target='_blank' class='url'>https://jakevdp.github.io/PythonDataScienceHandbook/index.html#2.-Introduction-to-NumPy</a></li><li><a href='http://www.scipy-lectures.org/intro/numpy/index.html' target='_blank' class='url'>http://www.scipy-lectures.org/intro/numpy/index.html</a></li><li><a href='https://jalammar.github.io/visual-numpy/' target='_blank' class='url'>https://jalammar.github.io/visual-numpy/</a></li></ul><h3 id='overall-1'><span>Overall...</span></h3><ul><li><span>Numpy is all about arrays, i.e., dimensional data</span></li><li><span>It offers easy ways to </span></li><li><span>Numpy is useful, but spend more time on Pandas...</span></li></ul><hr /><h2 id='pandas'><em><span>Pandas</span></em><span> </span></h2><h3 id='what-is-pandas'><span>What is Pandas?</span></h3><ul><li><p><span>The "Swiss army knife" of data manipulation in Python. </span></p></li><li><p><span>Like NumPy, adds a new data type to Python: the </span><strong><span>data frame</span></strong></p></li><li><p><span>DataFrames are often compared to spreadsheets or database tables: rows and columns</span></p><ul><li><span>All values in a column are of the same data type</span></li><li><span>Each row has a unique index value</span></li><li><span>Thus we can reference each row by its index and each column by its name</span></li></ul></li><li><p><span>With data in a data frame, Pandas has the tools to:</span></p><ul><li><span>sort, transform, pivot, melt data</span></li><li><span>subset/select/query specific row and or columns</span></li><li><span>compute summary stats</span></li><li><span>aggregate and join </span></li><li><span>plot data</span></li></ul></li></ul><h3 id='more-on-pandas'><span>More on Pandas</span></h3><ul><li><a href='https://jakevdp.github.io/PythonDataScienceHandbook/03.00-introduction-to-pandas.html' target='_blank' class='url'>https://jakevdp.github.io/PythonDataScienceHandbook/03.00-introduction-to-pandas.html</a></li><li><a href='https://www.datacamp.com/courses/pandas-foundations' target='_blank' class='url'>https://www.datacamp.com/courses/pandas-foundations</a></li><li><a href='http://nbviewer.jupyter.org/github/justmarkham/pandas-videos/blob/master/pandas.ipynb' target='_blank' class='url'>http://nbviewer.jupyter.org/github/justmarkham/pandas-videos/blob/master/pandas.ipynb</a></li></ul><h3 id='overall-2'><span>Overall</span></h3><p><span>While NumPy is an essential component for data analysis in Python, Pandas is likely more useful for every data tasks. It's DataFrame and other programming classes and functions are well organized and logically written. It does take a bit of time to get comfortable with all that it can do, especially if you are use to the visual learning that goes with desktop applications like Excel, but the more you stick with it, the more you'll see that Pandas can do - especially alongside all the other magnificent data packages being crafted for Python every day. </span></p><hr /><p> </p></div></div>
</body>
</html>