-
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathgood-maps.qmd
More file actions
31 lines (24 loc) · 928 Bytes
/
good-maps.qmd
File metadata and controls
31 lines (24 loc) · 928 Bytes
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
```{r}
#| echo: false
source("code/before_script.R")
```
# How to make good maps? {#sec-good-maps}
<!-- possibly after this chapter, we could add two or three chapters where one map is created step-by-step with the decision made explained (from the visual, not code point of view) -->
<!-- placeholder for maps to show somewhere: -->
```{r}
#| echo: false
#| eval: false
library(terra)
slo_elev = rast("data/slovenia/slo_elev.tif")
slo_terrain = terra::terrain(slo_elev, c("slope", "aspect"), unit = "radians")
slo_hs = terra::shade(slo_terrain$slope * 3, slo_terrain$aspect)
tm_shape(slo_hs) +
tm_raster(col.scale = tm_scale(values = gray(0:100 / 100), n = 100),
col.legend = tm_legend_hide()) +
tm_shape(slo_elev) +
tm_raster(col_alpha = 0.5,
col.scale = tm_scale(values = "geyser", midpoint = NA),
col.legend = tm_legend_hide()) +
tm_shape(slo_contours) +
tm_iso("white")
```