generated from r4ds/bookclub-template
-
Notifications
You must be signed in to change notification settings - Fork 7
/
01_Introduction.Rmd
148 lines (88 loc) · 4.15 KB
/
01_Introduction.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# Introduction
**Learning objectives:**
- Learn about the history of "spatial in R"
- Navigate terms like Geocomputation, GIS, Spatial Data Science
- Consider the advantages of CLI
- Consider the advantages of R
## Foreword 1st edition (R. Bivand)
**"Doing spatial in R"**:
- Being broad
- Open Source code
- Open data
- Reproducibility
- Learning from similar communities around open source GIS
1) Engage with the authors and the wider R-spatial community
2) Build your **workflow**
3) Enjoy it
## Preface
- target a wide audience: from GIS professional/specialist to useR
- Intermediate to advanced R user.
The book has 3 parts:
- Foundations: 7 chapters
- Extensions: 4 chapters
- Applications: 4 chapters
Each chapter has exercises (with a companion web site)
## What is geocomputation?
- Start with Stan Openshaw:
> “GeoComputation is about using the various different types of geodata and about developing relevant geo-tools within the overall context of a ‘scientific’ approach.”
- Authors include: reproducibility and collaboration:
> working with geographic data in a computational way, focusing on code, reproducibility and modularity.
- Part of Geography, expanding the tools used
- GIS (geographical information system/science), geomatics, geoinformatics, spatial information science, geographical data science, spatial data science (not mention by the authors) : more overlaps than difference.
## Why R
### CLI vs GUI
- Command Line Interface (CLI) faster than a GUI
Example: Broadband Analyst checking Networks
Current workflow:
1. Download Data from gov. agency (web browser)
2. Check the data in QGIS (eyeball data)
2b. Correct data
3. Transform to an appropriate CRS (coordinate system)
4. Create a buffer
5. Transform buffer to the previous CRS
6. Send back data to gov. agency
An example of a workflow with R:
```{r workflowexample, eval=FALSE}
# data could be read directly from gov. agency but this is an other topic
my_network <- sf::read_sf("my_data.shp") # read data into R
mapview::mapview(my_network) # eyeball data
# 2b still hard in R, but data could be tested
my_network_planarCRS <- sf::st_transform(my_network
, 32616) # UTM
my_buffer <- sf::st_buffer(my_network_planarCRS, 500) # buffer 500m
my_buffer_4326 <- sf::st_transform(my_buffer, 4326) # transform back
# data could also be send directly with R
```
- Code above is fully reproducible
- Volume/velocity of data: GPS/smartphone, UAV, Remote sensing etc..
- "Interfaces to other software are part of R" (**Rcpp**, **reticulate**).
- Lot of flexibility to produce what you need (*your workflow*)
- Great spatial statistics
## Software for geocomputation
R (and Python) is an interpreted language : Read - Eval - Print Loop (REPL)
- C++ : QGIS, GRASS, SAGA
- Java : GeoTools, JTS, Geoserver/Geonode
- Python: lot of API and can be used to call geoalgorithms in QGIS or ArcMap
## R spatial ecosystem
Two group of developments :
- {sp} --> {sf}: https://r-spatial.org/
- {raster} --> {terra}: https://www.rspatial.org/
## The history of R-spatial
- 1990s development of numerous S scripts/package
- 2000 R packages for spatial methods (points patterns, geostatistics, EDA)
- 2008 Applied Spatial Data Analysis with R first edition ({rgdal} 2003, {sp} 2005)
- 2009:{Rgooglemaps}, {ggmap} (basemap for ggplot2)
- 2010: {rgeos} / {raster}
- 2018: Breaking change PROJ: `proj string` --> `WKT`
- Huge increase in viz/carto packages: {gganimate}, {rayshader}, {tmap}, {mapview}, {mapsf}
## Meeting Videos
### Cohort 1
`r knitr::include_url("https://www.youtube.com/embed/lDl4pcanH-w")`
<details>
<summary> Meeting chat log </summary>
```
00:53:07 Jim Gruman: https://en.wikipedia.org/wiki/JTS_Topology_Suite
01:06:55 olivier leroy: https://docs.google.com/spreadsheets/d/1FApeBJuApgklw1pjJdBp9fKm58wtyBvsBxWJOEBgN4U/edit#gid=0
01:09:23 Abhimanyu Arora: Thank you very much
```
</details>