-
Notifications
You must be signed in to change notification settings - Fork 4
/
useR2024.html
871 lines (700 loc) · 30.4 KB
/
useR2024.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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Boost Spatial Data Science Workflows with GRASS GIS and R</title>
<meta name="description" content="GRASS GIS is a powerful geoprocessing engine that offers a robust and mature toolset for diverse applications.
GRASS was developed for speed and efficiency, which allows it to scale workflows with massive datasets rather simply. At the same time, R excels
at statistical analysis, modeling and data visualization, with a vibrant spatial community. We can join forces to build and enhance bridges
connecting our individual strengths.">
<meta name="author" content="Veronica Andreo">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<!-- <meta name="viewport" content="width=device-width, initial-scale=1.0"> -->
<link rel="stylesheet" href="reveal/reset.css">
<link rel="stylesheet" href="reveal/reveal.css">
<link rel="stylesheet" href="css/theme/osgeo.css" id="theme">
<link rel="stylesheet" href="css/nouislider.min.css" id="slide">
<!-- Theme used for syntax highlighted code -->
<link rel="stylesheet" href="reveal/plugin/highlight/monokai.css" id="highlight-theme">
<!-- For chalkboard plugin -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<!-- If the query includes 'print-pdf', include the PDF print sheet -->
<script>
if( window.location.search.match( /print-pdf/gi ) ) {
var link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = 'css/print/pdf.css';
document.getElementsByTagName( 'head' )[0].appendChild( link );
}
</script>
<!-- <link href="https://fonts.googleapis.com/css?family=Miriam+Libre" rel="stylesheet">-->
<style>
/* miriam-libre-regular - latin */
@font-face {
font-family: 'Miriam Libre';
font-style: normal;
font-weight: 400;
src: url('lib/font/miriam-libre/miriam-libre-v1-latin-regular.eot'); /* IE9 Compat Modes */
src: local('Miriam Libre'), local('MiriamLibre-Regular'),
url('lib/font/miriam-libre/miriam-libre-v1-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('lib/font/miriam-libre/miriam-libre-v1-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */
url('lib/font/miriam-libre/miriam-libre-v1-latin-regular.woff') format('woff'), /* Modern Browsers */
url('lib/font/miriam-libre/miriam-libre-v1-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */
url('lib/font/miriam-libre/miriam-libre-v1-latin-regular.svg#MiriamLibre') format('svg'); /* Legacy iOS */
}
/* miriam-libre-700 - latin */
@font-face {
font-family: 'Miriam Libre';
font-style: normal;
font-weight: 700;
src: url('lib/font/miriam-libre/miriam-libre-v1-latin-700.eot'); /* IE9 Compat Modes */
src: local('Miriam Libre Bold'), local('MiriamLibre-Bold'),
url('lib/font/miriam-libre/miriam-libre-v1-latin-700.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('lib/font/miriam-libre/miriam-libre-v1-latin-700.woff2') format('woff2'), /* Super Modern Browsers */
url('lib/font/miriam-libre/miriam-libre-v1-latin-700.woff') format('woff'), /* Modern Browsers */
url('lib/font/miriam-libre/miriam-libre-v1-latin-700.ttf') format('truetype'), /* Safari, Android, iOS */
url('lib/font/miriam-libre/miriam-libre-v1-latin-700.svg#MiriamLibre') format('svg'); /* Legacy iOS */
}
/* sintony-regular - latin */
@font-face {
font-family: 'Sintony';
font-style: normal;
font-weight: 400;
src: url('lib/font/sintony/sintony-v4-latin-regular.eot'); /* IE9 Compat Modes */
src: local('Sintony'),
url('lib/font/sintony/sintony-v4-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('lib/font/sintony/sintony-v4-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */
url('lib/font/sintony/sintony-v4-latin-regular.woff') format('woff'), /* Modern Browsers */
url('lib/font/sintony/sintony-v4-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */
url('lib/font/sintony/sintony-v4-latin-regular.svg#Sintony') format('svg'); /* Legacy iOS */
}
/* sintony-700 - latin */
@font-face {
font-family: 'Sintony';
font-style: normal;
font-weight: 700;
src: url('lib/font/sintony/sintony-v4-latin-700.eot'); /* IE9 Compat Modes */
src: local('Sintony Bold'), local('Sintony-Bold'),
url('lib/font/sintony/sintony-v4-latin-700.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('lib/font/sintony/sintony-v4-latin-700.woff2') format('woff2'), /* Super Modern Browsers */
url('lib/font/sintony/sintony-v4-latin-700.woff') format('woff'), /* Modern Browsers */
url('lib/font/sintony/sintony-v4-latin-700.ttf') format('truetype'), /* Safari, Android, iOS */
url('lib/font/sintony/sintony-v4-latin-700.svg#Sintony') format('svg'); /* Legacy iOS */
}
.reveal i.fa {
font-family:FontAwesome;
font-style: normal;
}
.reveal li > ul {
font-size: 85%;
line-height: 110%;
}
.reveal small {
display: inline-block;
font-size: smaller;
line-height: 1.2em;
vertical-align: baseline;
margin: 0.1em; }
.reveal small * {
vertical-align: baseline; }
.reveal .credit {
font-size: small;
color: gray;
margin: 0.1em;
}
.reveal .right, .reveal .textimg > img, .reveal .textimg > video, .reveal .textimg > iframe, .reveal .imgtext > p, .reveal .imgtext > ul, .reveal .imgtext > ol, .reveal .imgtext > div {
float: right;
text-align: left;
max-width: 47%;
}
.reveal .left, .reveal .imgtext > img, .reveal .imgtext > video, .reveal .imgtext > iframe, .reveal .textimg > p, .reveal .textimg > ul, .reveal .textimg > ol, .reveal .textimg > div {
float: left;
text-align: left;
max-width: 47%;
}
.flexcontainer {
display: flex;
width: 100%;
/* padding: 16% 2%; */
box-sizing: border-box;
/* height: 5vh; */
flex-wrap: wrap;
}
.flexbox {
flex: 1;
flex: 1 0 17%;
overflow: hidden;
transition: .5s;
margin: 0 4%;
box-shadow: 0 20px 30px rgba(0,0,0,.1);
line-height: 0;
}
.flexbox > img {
width: 90%;
height: 60%;
object-fit: cover;
margin: 0% 0%;
transition: .5s;
}
.flexbox > span {
font-size: 70%;
display: block;
text-align: center;
/* height: 2.5vh; */
line-height: 0.9;
}
mark {
background-color: #fdf4a0;
}
</style>
</head>
<body>
<div class="reveal">
<div class="slides">
<!-- ################# CONTENT ################# -->
<!--
Abstract
GRASS GIS is a powerful geoprocessing engine that offers a robust and mature toolset for diverse applications.
The core distribution brings together more than 500 tools for spatial and temporal analysis of vector, raster,
3D raster and imagery data. GRASS was developed for speed and efficiency, which allows it to scale workflows
with massive datasets rather simply. At the same time, R excels at statistical analysis, modeling and data
visualization. The spatial community within R has indeed grown significantly in the last decade, with the rise
of packages like sf, stars, gdalcubes, terra, mapview, tmap, among many others. The beauty of open source
software is that we do not need to reinvent the wheel each time. Instead, we can join forces to build bridges
that connect our individual strengths. In this talk, I’ll stand over the shoulders of giants, to demonstrate
how the combination of GRASS GIS and R through the rgrass package can help us integrate and streamline our
spatial data engineering and data science workflows for scientific and operational applications.
-->
<section>
<h1>Boost Spatial Data Science Workflows with GRASS GIS and R</h1>
<p style="margin-top: 0.5em">
<a href="http://veroandreo.gitlab.io/" style="font-weight: bold">
Veronica Andreo
</a> and the GRASS GIS community
</p>
<p class="title-foot">
<a href="http://geospatial.ncsu.edu/geoforall/" title="NCSU GeoForAll Lab">NCSU GeoForAll Lab</a>
at the
<a href="http://geospatial.ncsu.edu/" title="NCSU Center for Geospatial Analytics">Center for Geospatial Analytics</a>
<br>
<a href="http://www.ncsu.edu/" title="North Carolina State University">NC State University</a>
</p>
<img src="img/grass_gis.svg" height="200px"> <img src="img/R_logo.svg" height="180px" style="padding-bottom: 10px;">
<p><small>useR! Conference, Salzburg, July 8-11, 2024</small></p>
<p>
<a href="https://veroandreo.github.io/grass-gis-talks/useR2024.html">veroandreo.github.io/grass-gis-talks</a>
</section>
<section>
<img src="img/alf.png" class="stretch">
<p><small>After a talk with Jakub Nowosad at FOSS4G Europe last week :)</small></p>
</section>
<section id="Presenter">
<h2>About the presenter</h2>
<ul>
<img src="img/profile.png" class="bio-img">
<li>Visiting scholar at NC State's <a href="http://geospatial.ncsu.edu/" title="NCSU Center for Geospatial Analytics">Center for Geospatial Analytics</a>
<li>Lic. & PhD in Biology, MSc in Applications of the Spatial Information
<li>Researcher & lecturer at <a href="https://ig.conae.unc.edu.ar/" target="_blank">Gulich Institute</a> in Argentina</li>
<li>GRASS GIS: Development Team, PSC chair
<li>OSGeo: Charter member</li>
</ul>
</section>
<section id="What's GRASS">
<h1>What is GRASS GIS?</h1>
</section>
<section>
<h2>What is GRASS GIS?</h2>
<p>Geek open-source command line GIS</p>
<img src="img/grass84_cli.png" class="stretch">
</section>
<section>
<h2>What is GRASS GIS?</h2>
<p>Open-source desktop GIS</p>
<img src="img/grass_gui_multiple_map_displays.png" class="stretch">
</section>
<section>
<h2>What is GRASS GIS?</h2>
<p>Processing backend in QGIS</p>
<img src="img/grass-in-qgis.jpg" class="stretch">
<small>Image source: <a href="https://baharmon.github.io/grass-in-qgis">baharmon.github.io/grass-in-qgis</a></small>
<aside class="notes">
Not a QGIS plugin! GRASS provides tools, models and algorithms to QGIS.
</aside>
</section>
<section>
<h2>What is GRASS GIS?</h2>
<p>Data analytics tool in R or quarto notebooks</p>
<img src="img/grass_within_rstudio.png" class="stretch">
</section>
<section>
<h2>What is GRASS GIS?</h2>
<p>Geovisualization and data analytics tool in Python notebooks</p>
<img src="img/jupyter3.png" class="stretch">
</section>
<section>
<h2>What is GRASS GIS?</h2>
<p>Geoprocessing engine running in an HPC environment</p>
<img src="img/HPC_interaction.png" class="stretch">
</section>
<section>
<h2>What is GRASS GIS?</h2>
<p>Geospatial platform for developing custom models</p>
<img src="img/programming_FUTURES.png" class="stretch">
</section>
<section>
<h2>What is GRASS GIS?</h2>
<p>Cloud geoprocessing backend</p>
<img src="img/actinia_architecture_FTTH.png" class="stretch">
<small>Image source: <a href="https://neteler.gitlab.io/actinia-introduction/">neteler.gitlab.io/actinia-introduction/</a></small>
</section>
<section>
<h1>GRASS is all of that!</h1>
<br>
<h2>Robustness, Innovation with Stability, Versatility, Scientific foundations</h2>
<img src="img/grass_gis.svg" width="150px">
</section>
<section id="Why using GRASS">
<h1>Why using GRASS?</h1>
</section>
<section>
<h2>Mature and robust geoprocessing engine</h2>
<ul>
<li><b>500+</b> <a href="https://grass.osgeo.org/grass-stable/manuals/full_index.html">tools in core</a>,
<b>400+</b> <a href="https://grass.osgeo.org/grass-stable/manuals/addons/">addons</a></li>
</ul>
<br><br>
<div class="columns">
<div class="column" style="width:23%;">
Time series support
<img src="https://grass.osgeo.org/grass83/manuals/addons/t_rast_line_07.png">
</div>
<div class="column" style="width:24%;">
Remote Sensing toolset
<img src="img/i_colors_enhance.jpg">
</div>
<div class="column" style="width:24%;">
Hydrology & Geomorphology
<img src="https://grass.osgeo.org/grass83/manuals/r_sim_water.png">
</div>
<div class="column" style="width:24%;">
Simulations
<img src="img/FUTURES_addon.png">
</div>
</div>
<br><br>
<h2>Unique tools for diverse applications!!</h2>
</section>
<section>
<h2>Tools with parallel support</h2>
<div class="flexcontainer">
<div class="flexbox">
<img src="img/module_rslopeaspect.png">
<span>r.slope.aspect</span>
</div>
<div class="flexbox">
<img src="img/module_rneighbors.png">
<span>r.neighbors</span>
</div>
<div class="flexbox">
<img src="img/module_rmfilter.png">
<span>r.mfilter</span>
</div>
<div class="flexbox">
<img src="img/module_rseries.png">
<span>r.series</span>
</div>
<div class="flexbox">
<img src="img/module_rpatch.png">
<span>r.patch</span>
</div>
<div class="flexbox">
<img src="img/module_rsun.png">
<span>r.sun</span>
</div>
<div class="flexbox">
<img src="img/module_vsurfrst.png">
<span>v.surf.rst</span>
</div>
<div class="flexbox">
<img src="img/module_rsimwater.png">
<span>r.sim.water</span>
</div>
<div class="flexbox">
<img src="img/module_rsimsediment.png">
<span>r.sim.sediment</span>
</div>
<div class="flexbox">
<img src="img/module_rneighbors.png">
<span>r.resamp.interp</span>
</div>
<div class="flexbox">
<img src="img/module_rmfilter.png">
<span>r.resamp.filter</span>
</div>
<div class="flexbox">
<img src="img/module_runivar.png">
<span>r.univar</span>
</div>
</div>
<br>
<small>And more at <a href="https://grass.osgeo.org/grass-stable/manuals/keywords.html#parallel">
grass.osgeo.org/grass-stable/manuals/keywords.html#parallel</a></small>
</section>
<section>
<h2>API tooling for parallelizing Python scripts</h2>
<ul>
<li>Data parallelization: GridModule</li>
<li>Task parallelization: multiprocessing, ParallelModuleQueue</li>
</ul>
<pre><code data-trim data-noescape>
from grass.pygrass.modules.grid import GridModule
grd = GridModule("v.to.rast", input="roads", output="roads",
use="val", processes=4)
grd.run()
</code></pre>
<pre><code data-trim data-noescape>
r.mapcalc.tiled "log_dist = if (dist == 0, 0, log(dist))" nprocs=4
</code></pre>
<img src="img/tiling2.png" class="stretch">
</section>
<section>
<h2>HPC ready</h2>
<ul>
<li><a href="https://github.com/ncsu-geoforall-lab/grass-gis-on-hpc-henry2">Recipes for High Performance Computing setups</a></li>
<li>Better integration with conda environments: conda package on the way!</li>
<li>Reduced potential for race conditions</li>
<li>Easily create parallel workflows</li>
</ul>
<img src="img/skyview.png" class="stretch">
<small>by Vaclav Petras, Markus Neteler, Nicklas Larsson, …</small>
</section>
<section>
<h2>Streamlined access to data</h2>
<p>
Automated download and import of diverse datasets
<small>
i.eodag, i.sentinel, i.modis, i.landsat, r.in.usgs, r.in.nasadem, m.crawl.thredds, t.rast.import.netcdf, t.stac (on the way!), …
</small>
</p>
<img src="img/usgs_ned_naip_3d.png" class="stretch">
<p>
<small>
by
Fondazione Edmund Mach,
OpenGeoLabs,
mundialis,
GSoC,
NC State University,
CONICET,
Norwegian Institute for Nature Research,
…
</small>
</p>
</section>
<section>
<h2>Optimized for large data</h2>
<img src="img/big_files.jpg" class="stretch">
<p>392 billion cells!</p>
</section>
<section>
<h2>Fast External Data Links</h2>
<em>r.external</em> links (opens) external raster data (GeoTiffs, …) much faster.
<br>
<small>(2-5× faster, or almost no time for some workflows)</small>
<br>
<img src="img/r_external.png" class="stretch">
<p>by Markus Metz</p>
<p>Great for workflows when only portion of the data is processed in GRASS GIS.</p>
</section>
<section id="R packages using GRASS">
<h1>R packages using GRASS in the background</h1>
<ul>
<li><a href="https://glowabio.github.io/hydrographr/">hydrographr</a>: wrappers for GDAL and GRASS GIS
functions to efficiently work with <a href="https://essd.copernicus.org/articles/14/4525/2022/essd-14-4525-2022.html">Hydrography90m</a>
and spatial biodiversity data.</li>
<li><a href="https://github.com/apear9/rdwplus">rdwplus</a>: implementation of the IDW-PLUS (inverse distance weighted percent
land use for streams) algorithm with GRASS GIS tools.</li>
<li><a href="https://github.com/adamlilith/fasterRaster">fasterRaster</a>: handle large-in-memory/large-on-disk spatial rasters
and vectors in R through GRASS GIS.</li>
</ul>
<div class="columns">
<div class="column" style="width:30%;">
<img src="img/hydrographr.svg" width="100px">
</div>
<div class="column" style="width:30%;">
<img src="img/fasterRaster.png" width="100px">
</div>
</div>
<p><blockquote>Only a (dedicated) subset of GRASS tools available through these packages</blockquote></p>
</section>
<section>
<h1>R packages interfacing with GRASS</h1>
<ul>
<li><a href="//r-spatial.github.io/qgisprocess/">qgisprocess</a>: provides an R interface to the geoprocessing algorithms of QGIS, included GRASS provider (only a selection).</li>
<li><a href="https://r-spatial.github.io/link2GI/">link2GI</a>: functions to connect to common open source GI software packages, via wrapper functions and direct
API-use with system calls.</li>
<li><a href="https://rsbivand.github.io/rgrass/">rgrass</a>: interpreted interface between GRASS GIS and R, provides facilities for using <b>all GRASS tools
from the R command line</b>.</li>
</ul>
</section>
<section>
<h1><a href="https://rsbivand.github.io/rgrass/">rgrass</a></h1>
<ul>
<li><code>initGRASS()</code>: starts a GRASS session from R</li>
<li><code>execGRASS()</code>: executes GRASS commands from R</li>
<li><code>read_VECT()</code> and <code>read_RAST()</code>: read vector and raster maps from a GRASS project into R</li>
<li><code>write_VECT()</code> and <code>write_RAST()</code>: write vector and raster objects from R into a GRASS project</li>
</ul>
<br>
<img src="img/rgrass.png" class="stretch">
<p><blockquote>Access the full stack of tools and extensions in GRASS GIS from R!!</blockquote></p>
</section>
<section>
<h1>How to use GRASS through the rgrass package?</h1>
<img src="https://media.tenor.com/eD6ODXgpFdsAAAAi/wat.gif" class="stretch">
<h2>Choose your own adventure!</h2>
</section>
<section>
<h2>Use GRASS GIS tools within your R spatial workflows</h2>
<p><ul>
<li>Create a temporary GRASS project with the raster or vector map you want to process with GRASS</li>
<li>Write the R map object into the GRASS project</li>
<li>Run the desired GRASS tool(s) from R</li>
<li>Export the results back to R or your disk</li>
</ul>
</p>
</section>
<section>
<h2>Use GRASS GIS tools within your R spatial workflows</h2>
<p>Assuming we have a <em>terra SpatRast</em> object, r, within our R session:</p>
<pre><code>
library(rgrass)
grassbin <- system("grass --config path", intern = TRUE)
initGRASS(gisBase = grassbin,
home = tempdir(),
SG = r,
override = TRUE)
write_RAST(r, "terra_elev")
execGRASS("r.slope.aspect",
elevation = "terra_elev",
slope = "slope",
aspect = "aspect")
grass_maps <- read_RAST(c("aspect", "slope"))
</code></pre>
<p>Alternatively...</p>
<pre><code>
execGRASS("r.import", input=r, output="terra_elev")
execGRASS("r.external", input="file.tif", output="file") # much faster
</code></pre>
</section>
<section>
<h2>Use R tools within GRASS GIS workflows</h2>
<ul>
<li>From R, start GRASS within your project</li>
<li>Read vector or raster data from GRASS into R</li>
<li>Do your analysis, modeling, visualizations with R tools</li>
<li>Optionally write vector and raster outputs back into GRASS</li>
</ul>
</section>
<section>
<h2>Use R tools within GRASS GIS workflows</h2>
<pre><code>
grassdata <- path.expand("~/grassdata/")
project <- "nc_basic_spm_grass7"
mapset <- "PERMANENT"
initGRASS(gisBase = grassbin,,
gisDbase = grassdata,
location = project,
mapset = mapset,
override = TRUE,
remove_GISRC= TRUE)
execGRASS("g.list", parameters = list(type="raster"))
elev <- read_RAST("elevation")
# ... plot, run analysis and models, get outputs
write_RAST(elev, "new_elevation")
</code></pre>
<br>
<p><blockquote>Support for gdal-grass driver added to read directly from GRASS projects without exporting, thanks to Floris Vanderhaeghe</blockquote></p>
</section>
<section>
<h2>Use R tools within GRASS GIS workflows: an example</h2>
<https://veroandreo.github.io/grass_ncsu_2023/notebook_ex_sdm_r.html>
<br>
<iframe width="800" height="500"
src="img/use_r_with_grass_data.webm"
frameborder="0"
allowfullscreen>
</iframe>
<p><small><a href="https://veroandreo.github.io/grass_ncsu_2023/notebook_ex_sdm_r.html">veroandreo.github.io/grass_ncsu_2023</a></small></p>
</section>
<section>
<h2>GRASS resources</h2>
<ul>
<li>
Documentation:
<ul>
<li><a href="https://grass.osgeo.org/learn/">Learn center</a></li>
<li>See <a href="https://grass.osgeo.org/grass-stable/manuals/graphical_index.html">full list of core tools</a>
<li>See <a href="https://grass.osgeo.org/grass-stable/manuals/addons">tools in Addons repository</a>
</ul>
<li>
Tutorials <small>(my three favorites)</small>:
<ul>
<li>
<a href="https://veroandreo.github.io/grass_foss4geu_2024/">Let's combine GRASS, Python and R</a>
<li>
<a href="https://github.com/veroandreo/foss4g2022_grass4rs">GRASS GIS for remote sensing data processing</a>
<li>
<a href="https://github.com/ncsu-geoforall-lab/grass-gis-workshop-foss4g-2022">Unleash the power of GRASS GIS with Jupyter</small></a>
</ul>
</ul>
<br>
<img src="img/grass_gis.svg" alt="GRASS GIS logo" class="stretch">
</section>
<section>
<h2>Support</h2>
<ul>
<li>Community support
<ul>
<li><a href="https://lists.osgeo.org/mailman/listinfo/grass-user">user mailing list</a>
<li><a href="https://github.com/OSGeo/grass/discussions">GitHub Discussions</a>
<li><a href="https://app.element.io/#/room/#grassgis_community:gitter.im">Gitter channel</a>
<li><a href="https://grasswiki.osgeo.org/wiki/Mentoring_Program">Mentoring Program</a>
</li>
</ul>
<li>Commercial support
<ul>
<li><a href="https://www.mundialis.de/en/open-source-gis/">mundialis GmbH & Co KG</a>
<li><a href="https://opengeolabs.cz/en/home/">OpenGeoLabs</a> (& GISMentors)
<li><a href="https://geospatial.ncsu.edu/engage/service-center/">Center for Geospatial Analytics, NC State University</a>
<li>…
</ul>
</ul>
<br>
<img src="img/grass_community_meeting_group_pic_2024_crop_crop.jpg" alt="GRASS GIS logo" class="stretch">
</section>
<section>
<h1>Take home messages</h1>
<ul>
<li>Let's (re)use the best tools available for the tasks at hand</li>
<li>Let's focus on enhancing bridges!</li>
</ul>
<img src="https://a1.cdn.japantravel.com/photo/64558-218635/800!/5-of-japan-s-most-beautiful-bridges-218635.jpg" class="stretch">
</section>
<section id="Bye">
<img src="img/grass_license.png" alt="GRASS GIS logo" class="stretch">
<p>
<small>
Ask a question, get a special sticker <i class="fa fa-smile-o"></i>
</small>
</p>
<p><small>
<i class="fa fa-envelope"></i> veroandreo@gmail.com<br>
<small><a href="https://veroandreo.github.io/grass-gis-talks">veroandreo.github.io/grass-gis-talks</a></small><br>
<small>Funded by NSF award <a href="https://www.nsf.gov/awardsearch/showAward?AWD_ID=2303651">2303651</a></small>
</small></p>
</section>
<!-- ################# END CONTENT ################# -->
</div>
</div>
<!-- reveal internal plugins -->
<script src="reveal/reveal.js"></script>
<script src="reveal/plugin/notes/notes.js"></script>
<script src="reveal/plugin/markdown/markdown.js"></script>
<script src="reveal/plugin/highlight/highlight.js"></script>
<script src="reveal/plugin/math/math.js"></script>
<!-- extra plugins -->
<script src="reveal_plugins/chalkboard/plugin.js"></script>
<script>
// Full list of configuration options available here:
// https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
hash: true,
// Display controls in the bottom right corner
controls: true,
// Display a presentation progress bar
progress: true,
center: true,
// Display the page number of the current slide
slideNumber: false,
// Enable the slide overview mode
overview: true,
// Turns fragments on and off globally
fragments: true,
// The "normal" size of the presentation, aspect ratio will be preserved
// when the presentation is scaled to fit different resolutions. Can be
// specified using percentage units.
// width: 960,
// height: 700,
// Factor of the display size that should remain empty around the content
margin: 0.05, // increase?
// Bounds for smallest/largest possible scale to apply to content
minScale: 0.5,
maxScale: 5.0,
// Push each slide change to the browser history
history: true,
// Enable keyboard shortcuts for navigation
keyboard: true,
// Vertical centering of slides
center: true,
// Enables touch navigation on devices with touch input
touch: true,
// Loop the presentation
loop: false,
// Flags if the presentation is running in an embedded mode,
// i.e. contained within a limited portion of the screen
embedded: false,
// Number of milliseconds between automatically proceeding to the
// next slide, disabled when set to 0, this value can be overwritten
// by using a data-autoslide attribute on your slides
autoSlide: 0,
// Stop auto-sliding after user input
autoSlideStoppable: true,
// Enable slide navigation via mouse wheel
mouseWheel: false,
// Hides the address bar on mobile devices
hideAddressBar: true,
// Opens links in an iframe preview overlay
previewLinks: false,
// Slide transition
transition: 'none', // default/none/slide/concave/convex/zoom
// Transition speed
transitionSpeed: 'default', // default/fast/slow
// Transition style for full page slide backgrounds
backgroundTransition: 'none', // default/none/slide/concave/convex/zoom
// Number of slides away from the current that are visible
viewDistance: 3,
// Parallax background image
//parallaxBackgroundImage: '', // e.g. "'https://s3.amazonaws.com/hakim-static/reveal-js/reveal-parallax-1.jpg'"
// Parallax background size
//parallaxBackgroundSize: '' // CSS syntax, e.g. "2100px 900px"
chalkboard: {
boardmarkerWidth: 3,
chalkWidth: 7,
chalkEffect: 1.0,
src: null,
readOnly: undefined,
toggleChalkboardButton: true,
toggleNotesButton: true,
boardmarkers : [
{ color: 'rgba(220,20,60,1)', cursor: 'url(' + path + 'img/boardmarker-red.png), auto'},
{ color: 'rgba(255,140,0,1)', cursor: 'url(' + path + 'img/boardmarker-orange.png), auto'},
]
},
math: {
mathjax: 'https://cdn.jsdelivr.net/gh/mathjax/mathjax@2.7.8/MathJax.js',
config: 'TeX-AMS_HTML-full',
// pass other options into `MathJax.Hub.Config()`
TeX: { Macros: { RR: "{\\bf R}" } }
},
plugins: [
RevealMath,
RevealHighlight,
RevealMarkdown,
// RevealChalkboard
]
});
</script>
</body>
</html>