-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathindex.qmd
More file actions
127 lines (105 loc) · 4.36 KB
/
index.qmd
File metadata and controls
127 lines (105 loc) · 4.36 KB
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
# Introduction {.unnumbered}
[slack channel](https://spatialstatis-a8b5618.slack.com)
## Required packages
The following packages may be used during the course; it is assumed
that you know how to install packages, and have permission to do
so on your computer.
### CRAN packages:
```{r eval=FALSE}
install.packages(c("classInt",
"colorspace",
"dplyr",
"ggplot2",
"gstat",
"hglm",
"igraph",
"lme4",
"lwgeom",
"maps" ,
"mapview",
"randomForest",
"rnaturalearth",
"s2",
"scales",
"sf",
"sp",
"spacetime",
"spdep",
"spatialreg",
"spatstat",
"spData",
"stars",
"terra",
"tidyverse",
"tmap",
"units",
"viridis",
"viridisLite",
"xts"))
```
### non-CRAN packages:
```{r eval=FALSE}
install.packages("spDataLarge", repos = "https://nowosad.github.io/drat/",
type = "source") # 23 Mb
options(timeout = 3600) # 1 hr instead of 1 min
install.packages("starsdata", repos = "https://cran.uni-muenster.de/pebesma/",
type = "source") # 1 Gb
install.packages("rnaturalearthhires",
repos = "https://ropensci.r-universe.dev",
type = "source"
)
```
### Introduction to the course
* introduction of the tutor
* introduction of course participants, please state
* name,
* where you're from,
* what kind of spatial data analysis you have done so far
### How we work
Live sessions are from 14:00-18:00 CET (Berlin time);
daily schedule:
* 14:00 - 14:45 lecture
* 14:45 - 15:30 practical exercises (break-out groups)
* 15:30 - 15:45 discussion of exercises
* 15:45 - 16:15 break
* 16:15 - 17:00 lecture
* 17:00 - 17:45 practical exercises (break-out groups)
* 17:45 - 18:00 discussion of exercises
Further:
* please raise hands or speak up whenever something comes up
* slack communication during the full week
* please share questions you run into in your actual research, preferably with (example) data and R code
* please use the open channels in slack, so that everyone can learn from q + a's
### Resources
* [Spatial Data Science: With applications in R](https://r-spatial.org/book/), by Pebesma and Bivand 2023 (open online, hard copy from [CRC](https://www.routledge.com/Spatial-Data-Science-With-Applications-in-R/Pebesma-Bivand/p/book/9781138311183))
* Vignettes of [sf](https://r-spatial.github.io/sf/): tab "Articles"
* Vignettes of [stars](https://r-spatial.github.io/stars/): tab "Articles"
* All these material are written using [quarto](https://quarto.org/) or R-markdown
## Why R for spatial statistics?
* R is old! Think of the advantages!
* R is as good as any data science language, but is more in focus with the statistical community
* Most researchers in spatial statistics who share code have used or use R
* R has a strong ecosystem of users and developers, who communicate and collaborate (and compete, mostly in a good way)
* R spatial packages have gone full cycle:
* the first generation has been deprecated (`rgdal`, `rgeos`, `maptools`),
* then removed from CRAN, and
* superseded by modern versions (`sf` and `stars` replaced `sp`, `terra` replaced `raster`)
* R is a data science language that allows you [to work reproducibly](https://eartharxiv.org/repository/view/3216/)
* Because we have [CRAN](https://cran.r-project.org/) and CRAN Taskviews: [Spatial](https://cran.r-project.org/web/views/Spatial.html), [SpatioTemporal](https://cran.r-project.org/web/views/SpatioTemporal.html), [Tracking](https://cran.r-project.org/web/views/Tracking.html)
### Reproducing or recreating the current course
* Go to [https://github.com/edzer/sswr/](https://github.com/edzer/sswr/)
* Go to "Code", then "copy URL to clipboard"
* Clone this repo to your hard drive
* Start RStudio by double clickign the `sswr.Rproj` file in the source directory
* Reproduce these course materials by [installing quarto](https://quarto.org/docs/get-started/) and
* in RStudio: run `build` - `render book`, or
* on the command line: run `quarto render` in the course directory
* Run individual code sections in RStudio, and modify them!
## Exercises
1. Install the `spDataLarge` package (see instructions above)
2. Copy the course material from GitHub to your local machine
3. Open it in RStudio
4. Open the `day1.qmd` file. Try to identify a code chunk.
5. Run the first code chunk.
6. Skip to the last code chunk; run all code chunks above it (by a single click), and then run this last code chunk.
6. Render the entire course "book", view the result by opening `_book/index.html` in a web browser (from Rstudio)