-
Notifications
You must be signed in to change notification settings - Fork 19
/
index.Rmd
68 lines (46 loc) · 2.66 KB
/
index.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
---
title: "Using Spatial Data with R"
author: "Claudia A Engel"
date: "Last updated: `r format(Sys.time(), '%B %d, %Y')`"
site: bookdown::bookdown_site
output: bookdown::gitbook
documentclass: book
bibliography: [book.bib, packages.bib]
biblio-style: apalike
link-citations: yes
github-repo: cengel/R-spatial
description: "Workshop materials for Using Spatial Data with R"
always_allow_html: yes
---
# Prerequisites and Preparations {-}
To get the most out of this workshop you should have:
- a **basic knowledge** of R and/or be familiar with the topics covered in the [Introduction to R](https://cengel.github.io/R-intro/).
- have a recent version of [R](https://cran.r-project.org/) and [RStudio](https://www.rstudio.com/) installed.
**Recommended**:
- Create a new RStudio project `R-spatial` in a new folder `R-spatial`.
- Create a new folder under `R-spatial` and call it `data`.
- Open up a new R Script file and call it `R-spatial.R` for the code you'll create during the workshop.
- If you have your working directory set to `R-spatial` which contains a folder called `data` you can copy, paste, and run the following lines in R:
```{r download-files, eval=FALSE}
download.file("http://bit.ly/R-spatial-data", "R-spatial-data.zip")
unzip("R-spatial-data.zip", exdir = "data")
```
You can also download the data manually here [R-spatial-data.zip](https://github.com/cengel/R-spatial/raw/master/data/R-spatial-data.zip) and extract them in the `data` folder.
- Install and load the following libraries:
- [`sf`](https://cran.r-project.org/package=sf)
- [`terra`](https://cran.r-project.org/package=terra)
- [`tidyverse`](https://cran.r-project.org/package=tidyverse)
- For the mapping section install and load these additional libraries:
- [`classInt`](https://cran.r-project.org/package=classInt)
- [`RColorBrewer`](https://cran.r-project.org/package=RColorBrewer)
- [`ggplot2`](https://cran.r-project.org/package=ggplot2)
- [`tmap`](https://cran.r-project.org/package=tmap)
- [`leaflet`](https://cran.r-project.org/package=leaflet)(On Mac installing binary version is ok)
## References {-}
Lovelace, R., Nowosad, J., Muenchow. J. (2024): [Geocomputation with R](https://r.geocompx.org/)
Pebesma, E. Bivand, R. (2023): [Spatial Data Science](https://r-spatial.org/book/)
Gimond, M (2023): [Intro to GIS and Spatial Analysis](https://mgimond.github.io/Spatial/index.html)
[Spatial Data Analysis and Modeling with R and *terra*](http://www.rspatial.org/index.html)
[CRAN Task View: Analysis of Spatial Data](https://CRAN.R-project.org/view=Spatial)
## Acknowledgements {-}
Some of the materials for this tutorial are adapted from http://datacarpentry.org