-
Notifications
You must be signed in to change notification settings - Fork 8
/
osm-slides.qmd
107 lines (69 loc) · 1.54 KB
/
osm-slides.qmd
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
---
# Slide format:
format: revealjs
title: Tidy geographic data
subtitle: "with sf, dplyr, ggplot2, geos and friends"
bibliography: references.bib
---
# Introduction
## Session overview
![](images/paste-1.png)
Source: [pretalx.earthmonitor.org/opengeohub-summer-school-2023/schedule/v/0.7/](https://pretalx.earthmonitor.org/opengeohub-summer-school-2023/schedule/v/0.7/)
## System dependencies
![](images/paste-2.png)
Source: @pebesma2018
## Development environments
<!-- 2 columns in Quarto doc: -->
## RStudio
![](images/paste-4.png)
## VS Code
![](images/paste-3.png)
# Part 1: sf + dplyr
## Key features of `sf`
![](images/paste-5.png)
Source: @lovelace2019
## `sf` functions
![](images/paste-6.png)
Source: @pebesma2018
## `sf` + `dplyr` workflow
Mermaid graph:
``` mermaid
graph LR
A[Read data] --> B[Transform data]
B --> C[Visualize data]
```
## Practical (\~13:30-14:30)
Work through the code at [ogh23.robinlovelace.net/tidy](https://ogh23.robinlovelace.net/tidy) and answer the questions at your own pace.
```{r}
#| message: false
#| warning: false
# Install remotes if not already installed
if (!requireNamespace("remotes")) {
install.packages("remotes")
}
```
```{r}
#| eval: false
#| echo: true
remotes::install_cran(pkgs)
```
```{r}
#| echo: true
#| message: false
#| warning: false
# The packages we'll use
pkgs = c(
"sf",
"tidyverse",
"geos",
"data.table",
"spData"
)
sapply(pkgs, require, character.only = TRUE)
```
# Part 2: and friends
## tidyverse alternatives
...
## geos
...
# References