forked from mkudamatsu/mkudamatsu.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gis_lecture6.html
2948 lines (2782 loc) · 80 KB
/
gis_lecture6.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
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<!-- For Google search results -->
<title>ArcGIS for Economics: Lecture x</title>
<meta name="description" content="ArcGIS for economics researchers">
<meta name="author" content="Masayuki Kudamatsu">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
<!-- Activate Reveal.js -->
<link rel="stylesheet" href="css/reveal.css">
<!-- Define the theme -->
<link rel="stylesheet" href="css/theme/white4me.css" id="theme">
<!-- Code syntax highlighting -->
<link rel="stylesheet" href="lib/css/tomorrow.css">
<!-- Printing and PDF exports -->
<script>
var link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match( /print-pdf/gi ) ? 'css/print/pdf.css' : 'css/print/paper.css';
document.getElementsByTagName( 'head' )[0].appendChild( link );
</script>
<!--Add support for earlier versions of Internet Explorer -->
<!--[if lt IE 9]>
<script src="lib/js/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<!-- To activate the CSS framework of Reveal.js -->
<div class="reveal">
<!-- To reconfigure an HTML5 <section> element as a slide using CSS. -->
<div class="slides">
<!-- Slide contents start here -->
<!-- My own slide templates -->
<section id="title">
<h3 style="color:slategrey">
Causal Inference with Spatial Data
</h3>
<p style="color:slategrey">
(ArcGIS 10 for Economics Research)
</p>
<h3>
Lecture 6
</h3>
<h2>
Elevation
</h2>
<br>
<p>Masayuki Kudamatsu</p>
<p>16 November, 2018</p>
<br>
<p>
<small>Press <span style="color:red;">SPACE</span> to proceed. </small>
<br>
<small>To go back to the previous slide, press <span style="color:red;">SHIFT+SPACE</span>. </small>
</p>
</section>
<!-- ROAD MAP -->
<section id="road_map" style="text-align: left;">
<h3>
Today's road map
</h3>
<p>
1. Elevation in economics
</p>
<p>
2. Duflo & Pande (2007)
</p>
<p>
3. Replicate instruments in Duflo & Pande (2007)
</p>
<p>
4. Calculate polyline length
</p>
<p>
5. Loop over values in Python
</p>
</section>
<section>
<section id="section1">
<h1>
1. Elevation in economics
</h1>
<p>
It's a great source of exogenous variation!
</p>
</section>
<section id="" data-transition="slide-in slide-out" style="text-align: left;">
<h3>
<a href="http://dx.doi.org/10.1257/aer.101.7.3078" target="_blank">Dinkelman (2011)</a>
</h3>
<p>
Electrification in South Africa (1996-2001)
</p>
<p>
$\Rightarrow$ Female labor supply $\uparrow$
</p>
<p class="fragment" data-fragment-index="1">
Electrification: instrumented by <strong>mean land gradient</strong>
</p>
<ul class="fragment" data-fragment-index="1">
<li>
Flat terrain: cheap to lay power lines
</li>
</ul>
</section>
<section id="" data-transition="slide-in slide-out" style="text-align: left;">
<h3>
<a href="http://dx.doi.org/10.1162/qjec.2008.123.3.1251" target="_blank">Qian (2008)</a>
</h3>
<p>
Tea production $\uparrow$ in China due to liberalization in 1979
</p>
<p>
$\Rightarrow$ Male-to-female ratio $\downarrow$
</p>
<p class="fragment" data-fragment-index="1">
Tea production: instrumented by <strong>mean land gradient</strong>
</p>
<ul class="fragment" data-fragment-index="1">
<li>
Tea grows in hilly terrain
</li>
</ul>
</section>
<!-- <section id="" data-transition="slide-in slide-out" style="text-align: left;">
<h3>
<a href="http://dx.doi.org/10.1257/app.1.4.1" target="_blank">Olken (2009)</a>
</h3>
<p>
# of TV channels $\uparrow$ in Indonesia $\Rightarrow$ Social capital $\downarrow$
</p>
<p>
TV: instrumented by <strong>signal strength</strong>
</p>
<img src="gis_lecture6/olken.png" style="border:none; background:none; box-shadow:none; width:800px;">
</section> -->
<section id="" data-transition="slide-in slide-out" style="text-align: left;">
<h3>
<a href="http://dx.doi.org/10.1093/qje/qju020" target="_blank">Yanagizawa-Drott (2014)</a>
</h3>
<p>
Anti-Hutu radio station in Rwanda
</p>
<p>
$\Rightarrow$ Genocide incidents $\uparrow$
</p>
<p class="fragment" data-fragment-index="1">
Radio: instrumented by <strong>signal strength</strong>
</p>
<img src="gis_lecture6/olken.png" style="border:none; background:none; box-shadow:none; width:800px;" class="fragment" data-fragment-index="1">
</section>
<!-- <section id="" data-transition="slide-in fade-out" style="text-align: left;">
<h3>
<a href="http://dx.doi.org/10.1257/app.5.2.200" target="_blank">Lipscomb et al. (2013)</a>
</h3>
<p>
Electricity in Brazil $\Rightarrow$ Poverty $\downarrow$
</p>
<p>
IV for electricity constructed as follows:
</p>
<ol>
<li>
Regress (probit) hydropower plant on topography measures (incl. <strong>river gradient</strong>) across grid points in Brazil
</li>
<li>
Use fitted values to rank locations by its geographic suitability for hydropower plants
</li>
<li>
Obtain total # of hydropower plants constructed nationwide in each period
</li>
</ol>
</section>
<section id="" data-transition="fade-in slide-out" style="text-align: left;">
<h4>
Lipscomb et al. (2013) (cont.)
</h4>
<ol>
<li value="4">
If $n$ plants were constructed in period 1, turn on the instrument for the $n$ most suitable locations
</li>
<li>
If $m$ plants were additionally constructed in period 2, turn on the instrument for the next $m$ most suitable locations
</li>
<li>
And so forth...
</li>
</ol>
<p>
$\Rightarrow$ 1st-stage F-stat: over 20
</p>
</section> -->
</section>
<section>
<section id="section2">
<h1>
2. <a href="http://dx.doi.org/10.1162/qjec.122.2.601" target="_blank">Duflo & Pande (2007)</a>
</h1>
</section>
<section id="rq1" data-transition="slide-in slide-out" style="text-align: left;">
<h3>Research Question</h3>
<p>
Do irrigation dams improve agricultural production and reduce rural poverty in India?
</p>
<p>
Important?
</p>
<ul class="fragment" data-fragment-index="1">
<li>
Dams: built on nearly 1/2 of rivers worldwide
</li>
<li>
Believed to reduce poverty, but no credible evidence
</li>
</ul>
<p>
Original?
</p>
<ul class="fragment" data-fragment-index="2">
<li>
Use geography to obtain credible impact estimates
</li>
</ul>
<p>
Feasible?
</p>
</section>
<section id="data1" data-transition="slide-in slide-out" style="text-align: left;">
<h3>Data</h3>
<p>
Unit of analysis: districts
</p>
<p>
Agricultural production data: annual 1971-99
</p>
<p>
Poverty data: 1973, 83, 87, 93, 99
</p>
<p class="fragment" data-fragment-index="1">
Dams: location (nearest city), data of completion
</p>
<ul class="fragment" data-fragment-index="1">
<li>
Source: World Registry of Large Dams
</li>
</ul>
</section>
<section id="empirical_strategy1" data-transition="slide-in fade-out" style="text-align: left;">
<h3>Identification strategy</h3>
<p>
Dam constriction: instrumented by river gradient
</p>
<p>
$\Leftarrow$ Dams: easier to build if river gradient is
<ul style="margin-left: 85px;">
<li>
Moderate for irrigation dams
</li>
<li>
Very steep for hydroelectricity dams
</li>
</ul>
</p>
<p class="fragment" data-fragment-index="1">
How to use time-invariant river gradient for panel regression?
</p>
</section>
<section id="empirical_strategy2" data-transition="fade-in fade-out" style="text-align: left;">
<h3>
1st stage
</h3>
<p>
\begin{align*}
D_{ist}
=& \ \sum_{k=2}^4 \alpha_k (RGr_{ki} \ast \bar{D}_{st})
+ (\mathbf{M}'_i \ast \bar{D}_{st})\boldsymbol{\beta} \\
& + \sum_{k=2}^4 \gamma_k (RGr_{ki} \ast l_{t}) + \nu_i + \mu_{st} + \omega_{ist}
\end{align*}
</p>
<table border="0" width="100%">
<tr>
<td style="text-align: center">$D_{ist}$</td>
<td># dams in district $i$ state $s$ in year $t$</td>
</tr>
<tr>
<td style="text-align: center">$RGr_{ki}$</td>
<td>Fraction of river areas in gradient category $k$</td>
</tr>
<tr>
<td style="text-align: center"></td>
<td>(2 for 1.5-3%; 3 for 3-6%, 4 for over 6%)</td>
</tr>
</table>
<p class="fragment" data-fragment-index="1" style="color:slategrey">
We will learn how to calculate $RGr_{ki}$ in ArcGIS
</p>
</section>
<section id="empirical_strategy3" data-transition="fade-in fade-out" style="text-align: left;">
<h4>
1st stage (cont.)
</h4>
<p>
\begin{align*}
D_{ist}
=& \ \sum_{k=2}^4 \alpha_k (RGr_{ki} \ast \bar{D}_{st})
+ (\mathbf{M}'_i \ast \bar{D}_{st})\boldsymbol{\beta} \\
& + \sum_{k=2}^4 \gamma_k (RGr_{ki} \ast l_{t}) + \nu_i + \mu_{st} + \omega_{ist}
\end{align*}
</p>
<table border="0" width="100%">
<tr>
<td style="text-align: center">$\bar{D}_{st}$</td>
<td>Predicted # of dams in state $s$ in year $t$<br>
$=\frac{D_{s,1970}}{\sum_s D_{s,1970}}*\sum_s D_{st}$ <br><span style="color:slategrey">($D_{st}$: # dams in state $s$ in year $t$)</span></td>
</tr>
<tr class="fragment" data-fragment-index="2">
<td style="text-align: center"></td>
<td>$\Leftarrow$ $D_{st}$ is endogenous to poverty</td>
</tr>
</table>
</section>
<section id="num_of_dams" data-transition="fade-in fade-out">
<h4>
Annual total # of dams in India ($\sum_s D_{st}$)
</h4>
<img src="gis_lecture6/damsF3.png" style="border: none; background: none; box-shadow:none; width: 800px;">
<p>
<small>(Figure III of Duflo and Pande 2007)</small>
</p>
</section>
<section id="empirical_strategy4" data-transition="fade-in fade-out" style="text-align: left;">
<h4>
1st stage (cont.)
</h4>
<p>
\begin{align*}
D_{ist}
=& \ \sum_{k=2}^4 \alpha_k (RGr_{ki} \ast \bar{D}_{st})
+ (\mathbf{M}'_i \ast \bar{D}_{st})\boldsymbol{\beta} \\
& + \sum_{k=2}^4 \gamma_k (RGr_{ki} \ast l_{t}) + \nu_i + \mu_{st} + \omega_{ist}
\end{align*}
</p>
<table border="0" width="100%">
<tr>
<td style="text-align: center">$\mathbf{M}_i$</td>
<td>Controls: river length, fraction of district areas with each gradient cateogry, etc.</td>
</tr>
<tr>
<td style="text-align: center">$l_{t}$</td>
<td>Year dummies</td>
</tr>
<tr>
<td style="text-align: center">$\nu_i,\mu_{st}$</td>
<td>District and state-year FEs</td>
</tr>
</table>
<p>
Why should we control for each of these variables?
</p>
</section>
<section id="empirical_strategy5" data-transition="fade-in slide-out" style="text-align: left;">
<h4>
1st stage (cont.)
</h4>
<p>
\begin{align*}
D_{ist}
=& \ \sum_{k=2}^4 \alpha_k (RGr_{ki} \ast \bar{D}_{st})
+ (\mathbf{M}'_i \ast \bar{D}_{st})\boldsymbol{\beta} \\
& + \sum_{k=2}^4 \gamma_k (RGr_{ki} \ast l_{t}) + \nu_i + \mu_{st} + \omega_{ist}
\end{align*}
</p>
<table border="0" width="100%">
<tr>
<td style="text-align: center">$\mathbf{M}_i$</td>
<td>Controls: <span style="color:firebrick">river length</span>, fraction of district areas with each gradient cateogry, etc.</td>
</tr>
<tr>
<td style="text-align: center">$l_{t}$</td>
<td>Year dummies</td>
</tr>
<tr>
<td style="text-align: center">$\nu_i,\mu_{st}$</td>
<td>District and state-year FEs</td>
</tr>
</table>
<p style="color:firebrick">
We will learn how to obtain river length in $\mathbf{M}_i$
</p>
</section>
<section id="empirical_strategy5" data-transition="slide-in fade-out" style="text-align: left;">
<h3>
2nd stage
</h3>
<p>
\begin{align*}
y_{ist} =& \ \gamma_i + \eta_{st} + \delta D_{ist} + \delta^U D_{ist}^U \\
& + \mathbf{Z}_{ist}\mathbf{\delta_Z} + \mathbf{Z^U}_{ist}\mathbf{\delta_Z^U} + \varepsilon_{ist}
\end{align*}
</p>
<table border="0" width="100%">
<tr>
<td style="text-align: center">$y_{ist}$</td>
<td>Agricultural outcomes / poverty measures</td>
</tr>
<tr class="fragment" data-fragment-index="1">
<td style="text-align: center">$D_{ist}$</td>
<td># of dams in own district <span class="fragment" data-fragment-index="4">(harmful)</span></td>
</tr>
<tr>
<td style="text-align: center"></td>
<td class="fragment" data-fragment-index="4">$\Leftarrow$ Displacement, soil degradation, restricted water use</td>
</tr>
<tr class="fragment" data-fragment-index="2">
<td style="text-align: center">$D_{ist}^U$</td>
<td># of dams in upstream districts <span class="fragment" data-fragment-index="3">(beneficial)</span></td>
</tr>
<tr>
<td style="text-align: center"></td>
<td class="fragment" data-fragment-index="3">$\Leftarrow$ Irrigation</td>
</tr>
<tr class="fragment" data-fragment-index="5">
<td style="text-align: center">$\mathbf{Z}_{ist}$</td>
<td>All the controls for own district</td>
</tr>
<tr class="fragment" data-fragment-index="5">
<td style="text-align: center">$\mathbf{Z^U}_{ist}$</td>
<td>All the controls for upstream districts</td>
</tr>
</table>
</section>
<section id="empirical_strategy6" data-transition="fade-in slide-out" style="text-align: left;">
<h4>
2nd stage (cont.)
</h4>
<p>
\begin{align*}
y_{ist} =& \ \gamma_i + \eta_{st} + \delta D_{ist} + \delta^U D_{ist}^U \\
& + \mathbf{Z}_{ist}\mathbf{\delta_Z} + \mathbf{Z^U}_{ist}\mathbf{\delta_Z^U} + \varepsilon_{ist}
\end{align*}
</p>
<p>
$D_{ist}$: instrumented by fitted value from 1st stage
</p>
<p>
$D_{ist}^U$: instrumented by sum of fitted values from 1st stage for upstream districts
</p>
<p class="fragment" data-fragment-index="1">
cf. Using the fitted value from 1st stage as IV yields the 2SLS estimator (see Section 9.5.1 of <a href="https://www.amazon.com/Econometric-Analysis-Fourth-4th-Included/dp/B002NCQ3HM" target="_blank">Greene (2000)</a>, p. 374)
</p>
</section>
<section id="result1" data-transition="slide-in slide-out">
<h4>
1st stage results
</h4>
<img src="gis_lecture6/damsT2.png" style="border: none; background: none; box-shadow:none; width: 600px;">
<p>
<small>(Table II of Duflo and Pande 2007)</small>
</p>
</section>
<section id="result2a" data-transition="slide-in fade-out">
<h4>
2nd stage results (on agriculture)
</h4>
<img src="gis_lecture6/damsT3a.png" style="border: none; background: none; box-shadow:none; width: 700px;">
<p>
<small>(Table III of Duflo and Pande 2007)</small>
</p>
</section>
<section id="result2b" data-transition="fade-in fade-out">
<h4>
2nd stage results (on agriculture)
</h4>
<img src="gis_lecture6/damsT3b.png" style="border: none; background: none; box-shadow:none; width: 700px;">
<p>
<small>(Table III of Duflo and Pande 2007)</small>
</p>
</section>
<section id="result2c" data-transition="fade-in slide-out">
<h4>
2nd stage results (on poverty)
</h4>
<img src="gis_lecture6/damsT8.png" style="border: none; background: none; box-shadow:none; width: 700px;">
<p>
<small>(Table VIII of Duflo and Pande 2007)</small>
</p>
</section>
</section>
<!-- Preparation -->
<section>
<section id="preparation1" data-transition="slide-in fade-out" style="text-align: left;">
<h3>
Prepare for the rest of this lecture
</h3>
<p>
1. Launch ArcMap 10 (it takes time)
</p>
<p>
2. <a href="https://www.dropbox.com/s/3didb10i3opzlbn/Lecture6.zip?dl=1" target="_blank">Download the zipped dataset for Lecture 6</a>
</p>
<p>
3. Save it to <strong>Desktop</strong> (<code>C:\\Users\\<em>yourname</em>\\Desktop</code>)
</p>
<p>
4. Right-click it and choose <span style="background-color: Gainsboro">7-Zip > Extract to "Lecture6\"</span>
</p>
<ul style="margin-left: 72px;">
<li>
So the directory path will be: <code>C:\\Users\\<em>yourname</em>\\Desktop\\Lecture6</code>
</li>
</ul>
<p>
In the <code>input</code> folder:
</p>
<p>
5. Right-click <code>10m-rivers-lake-centerlines.zip</code> and select <span style="background-color: Gainsboro">7-Zip > Extract to Here</span>
</p>
</section>
<section id="preparation2" data-transition="slide-out fade-in" style="text-align: left;">
<h4>
Prepare for the rest of this lecture (cont.)
</h4>
<p>
Now in ArcMap's <strong>Catalogue Window</strong>:
</p>
<p>
6. Establish connection to data folder
</p>
<ul style="margin-left: 72px;">
<li style="margin-bottom: 5px;">
Right-click <span style="background-color: Gainsboro">Folder Connections</span>
</li>
<li style="margin-bottom: 5px;">
Select <span style="background-color: Gainsboro">Connect to Folder</span>
</li>
<li>
Choose <span style="background-color: Gainsboro">Desktop > Lecture6</span>
</li>
</ul>
<p>
7. Create two empty models in the <code>code/models.tbx</code>
</p>
<ul style="margin-left: 72px;">
<li>
<code>exercises1-3</code>
</li>
<li>
<code>exercise4</code>
</li>
</ul>
</section>
<section id="elevation-data1" data-transition="slide-in fade-out" style="text-align: left;">
<h4>
Elevation data
</h4>
<p>
We use SRTM30 (version 2.1)
</p>
<ul>
<li>
It supersedes GTOPO30 used by Duflo and Pande (2007)
</li>
<li>
<a href="http://www.geo-airbusds.com/worlddem/" target="_blank">WorldDEM</a> is an updated version, but not for free of charge
</li>
</ul>
<p>
Resolution: 30x30 arc seconds (roughly 1x1km)
</p>
<p>
Avaialable in 27 separate tiles
</p>
<img src="gis_lecture6/srtm30tiles.png" style="border:none; background:none; box-shadow:none; width:400px;">
</section>
<section id="elevation-data2" data-transition="fade-in fade-out" style="text-align: left;">
<h4>
How to use SRTM30 in ArcGIS 10
</h4>
<p>
1. Log on to: <a href="http://www.webgis.com/srtm30.html" target="_blank">webgis.com/srtm30.html</a>
</p>
<p>
2. Click the tile covering your study area
</p>
<p>
3. Download:
</p>
<ul>
<li>
<code>***.dem.zip</code> (data file)
</li>
<li>
<code>***.hdr.zip</code> (header file)
</li>
<li>
<code>***.prj.zip</code> (projection file)
</li>
<li>
<code>***.stx.zip</code> (statistics file)
</li>
</ul>
<p>
For this lecture, these four files for India (<code>060n40.***.zip</code>) are already downloaded <br>in the <code>input/</code> folder.
</p>
</section>
<section id="elevation-data3" data-transition="fade-in fade-out" style="text-align: left;">
<h4>
How to use SRTM30 in ArcGIS 10 (cont.)
</h4>
<p>
4. Unzip them so the four files (.DEM, .HDR, .PRJ, .STX) are all saved in the same directory
</p>
<ul>
<li>
Right-click each .zip file and choose <span style="background-color: Gainsboro">7-Zip > Extract Here</span>
</li>
</ul>
<p>
5. Drag the .DEM file from ArcMap's Calatogue window
</p>
<p>
6. For geo-processing, use the .DEM file as the input file
</p>
<p>
7. If you use multiple tiles, <strong><a href="http://desktop.arcgis.com/en/arcmap/10.3/tools/data-management-toolbox/mosaic-to-new-raster.htm" target="_blank">Mosaic to New Raster</a></strong> appends them all
</p>
</section>
<section id="mosaic-to-new-raster" data-transition="fade-in slide-out" style="text-align: left;">
<h4>
<a href="http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/mosaic-to-new-raster.htm" target="_blank">Mosaic to New Raster</a>
</h4>
<p>
Make sure to set the appropriate <strong>pixel type</strong>
</p>
<ul>
<li>
By default, it sets <code>8_BIT_UNSIGNED</code> (i.e. 0 to 255)
</li>
<li>
If your raster data is in decimals, negative values, or larger than 255, it gets distorted
</li>
<li>
For elevation data, choose <code>16_BIT_SIGNED</code> (i.e. -32,768 to 32,767)
</li>
</ul>
</section>
</section>
<!-- SECTION for ArcMap -->
<section>
<section id="section3">
<h1>
3. Replicate Instruments in Duflo & Pande (2007)
</h1>
</section>
<section id="data2construct1" data-transition="slide-in fade-out" style="text-align: left;">
<h3>
Data we want to construct
</h3>
<p>
District-level data on fraction of river areas with gradient:
</p>
<ul>
<li>
1.5-3%
</li>
<li>
3-6%
</li>
<li>
6% or steeper
</li>
</ul>
<div class="fragment" data-fragment-index="1">
<p>
$\Rightarrow$ Obtain gradient of each segment of river by matching river polylines with gradient raster:
</p>
<img src="gis_lecture6/river_on_grid.jpg" style="border: none; background: none; box-shadow:none; width: 400px; float: left ;">
</div>
</section>
<section id="data2construct2" data-transition="fade-in fade-out" style="text-align: left;">
<h4>
Data we want to construct (cont.)
</h4>
<p>
If each raster cell is not of equal size within a district
</p>
<ul>
<li>
Each cell is large
</li>
<li>
The district stretches a lot along the north-south direction
</li>
</ul>
<p class="fragment" data-fragment-index="1">
$\Rightarrow$ Need to project the raster data <span style="color:slategrey">(cf. Lecture 7)</span>
<p>
</section>
<section id="data2construct3" data-transition="fade-in fade-out" style="text-align: left;">
<h4>
Data we want to construct (cont.)
</h4>
<p>
But this lecture assumes:
</p>
<p>
Each river segment is <strong>of equal size</strong> within the same district
</p>
<ul class="fragment" data-fragment-index="1">
<li>
Districts in India are at most 3° wide in latitude
</li>
<ul class="fragment" data-fragment-index="2">
<li>
India is located from 8° to 37° North
</li>
<li class="fragment" data-fragment-index="3">
1° in longitude at 15° = 107.551km
</li>
<li class="fragment" data-fragment-index="4">
1° in longitude at 30° = 96.486km
</li>
</ul>
<li class="fragment" data-fragment-index="5">
30 seconds in longitude can differ up to <strong>only 18m</strong>
</li>
</ul>
<p class="fragment" data-fragment-index="6" style="text-align: center;">
$\frac{107551-96486}{120}*\frac{3}{30-15} \approx 18$
<p>
</section>
<!-- Standard text slide -->
<section id="data2construct4" data-transition="fade-in fade-out" style="text-align: left;">
<h4>
Data we want to construct (cont.)
</h4>
<p>
If each river segment is of equal size,
</p>
<p>
$\Rightarrow$ We can use Zonal Statitics <span style="color:slategrey">(cf. Lecture 5)</span> with two inputs:
</p>
<ol style="margin-left: 85px;">
<li>
River polylines
</li>
<li>
Indicator raster for each gradient category
</li>
<ul>
<li>
1 for (say) 3-6%
</li>
<li>
0 otherwise
</li>
</ul>
</ol>
<br>
<table style="margin-top: 50px;">
<tr class="fragment" data-fragment-index="1">
<td style="text-align: center; border: 1px solid black;">Mean cell value among river cells</td>
<td style="text-align: center;">=</td>
<td style="text-align: center; border: 1px solid black;">Fraction of river areas with gradient 3-6%</td>
</tr>
<tr class="fragment" data-fragment-index="2">
<td style="text-align: center">
$\uparrow$
</td>
<td></td>
<td></td>
</tr>
<tr class="fragment" data-fragment-index="2">
<td style="text-align: center">
Zonal Statistics
</td>
<td></td>
<td></td>
</tr>
</table>
</section>
<section id="data2construct5" data-transition="fade-in slide-out" style="text-align: left;">
<h4>
Data we want to construct (cont.)
</h4>
<p>
1. Indicator raster for each gradient category
</p>
<ul>
<li>
1.5-3%
</li>
<li>
3-6%
</li>
<li>
6% or steeper
</li>
</ul>
<p>
2. River polylines intersected & dissolved by district
</p>
<p class="fragment" data-fragment-index="1">
3. % of river segments in each gradient category
</p>
<ul class="fragment" data-fragment-index="1">
<li>
Use Zonal Statistics with 1 and 2 as inputs
</li>
</ul>
</section>
<section id="ex1a" data-transition="slide-in slide-out" style="text-align: left;">
<h4>
Exercise #1: Overview
</h4>
<h3>
Indicator raster for each gradient category
</h3>
<p>
Input: elevation data (<code>E060N40.DEM</code>)
</p>
<p>
Geo-processing tools:
</p>
<p>
1. Slope
</p>
<ul style="margin-left: 72px;">
<li>
Transform elevation to gradient
</li>
</ul>
<p>
2. Reclassify (Spatial Analyst)
</p>
<ul style="margin-left: 72px;">
<li>
Create indicator raster cells
</li>
</ul>
</section>
<section id="" data-transition="slide-in fade-out" style="text-align: left;">
<h3>
What Slope tool does
</h3>
<p>
Return either $\theta$ or $\tan\theta$ in diagram below
</p>
<p>
<img src="gis_lecture6/slope.gif" style="border: none; background: none; box-shadow:none; width: 800px;">
</p>
</section>
<section id="" data-transition="fade-in fade-out" style="text-align: left;">
<h4>
What Slope tool does (cont.)
</h4>
<p>
<img src="gis_lecture6/cells.gif" style="border: none; background: none; box-shadow:none; width: 200px; float: right;">
</p>
<p>
$\tan\theta$ for cell $e$ is obtained by
</p>
<p>
\begin{align*}
\Rightarrow \ \tan \theta = \sqrt{(dz/dx)^2+(dz/dy)^2}
\end{align*}
</p>
<p>
where
</p>
<p>
\begin{align*}
\frac{dz}{dx} = & \ \Big[\frac{c + 2f + i}{4} - \frac{a+2d+g}{4}\Big] / 2 \\
\frac{dz}{dy} = & \ \Big[\frac{a+2b+c}{4} - \frac{g + 2h + i}{4}\Big] / 2
\end{align*}
</p>
</section>
<section id="" data-transition="fade-in fade-out" style="text-align: left;">
<h4>
Exercise #1: Step 1
</h4>
<h3>
SLOPE
</h3>
<p>
<strong>Input raster</strong>: <code>...\Lecture6\input\E060N40.DEM</code>
</p>
<p>
<strong>Output raster</strong>: <code>...\Lecture6\temporary\slope.tif</code>
</p>
<p>
<strong>Output Measurement</strong>: PERCENT_RISE
</p>
<ul>
<li>
Duflo & Pande (2007) use gradient in % (i.e. $\tan\theta\times 100$)
</li>
<li>
If you need $\theta$, choose DEGREE instead
</li>
</ul>
<p>
<strong>Z factor</strong>: 0.000009
</p>
<ul>
<li>
# of (x,y) units in one z unit
</li>
<li>
0.000009° = 1m
</li>
</ul>
</section>
<section id="" data-transition="fade-in slide-out" style="text-align: left;">
<h3>
Z-factor
</h3>
<p>
<strong>1</strong> if raster data is in projected coordinate system
</p>
<ul>
<li>
If coordinates and elevation are in different units (e.g., feet vs meters), use appropriate conversion factor
</li>
</ul>
<p>
<strong>0.000009</strong> if geographic coordinate system and low-latitude areas
</p>
<ul>
<li>
1° $\approx$ 111,120 meters
</li>
</ul>
<p>
For middle- to high-latitude areas, use Project Raster first to use UTM projections <span style="color:slategrey">(cf. Lecture 7)</span>