-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathindex.Rmd
85 lines (65 loc) · 2.97 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
---
title: "R for Geospatial Processing"
author: "Nicolas Roelandt"
date: "`r Sys.Date()`"
bibliography:
- book.bib
- packages.bib
description: This is the training materials for the **R for Geospatial Processing**
workshop at FOSS4G 2019, Bucarest (Romania).
documentclass: book
link-citations: yes
site: bookdown::bookdown_site
biblio-style: apalike
---
# Prerequisites
This workshop is designed for the attendance of FOSS4G 2019. So basics knowledge in GIS is expected (simple features, projections and CRS, geometrical operations, etc.).
No knowledge of R is required. A minimal knowledge of [(R)mardown](https://rmarkdown.rstudio.com/) will be a plus to take notes.
Please install R on your system and the following libraries.
Please follow installation instructions from the [CRAN projet](https://cran.r-project.org/).
The {sf} library needs several geospatial core libraries (GDAL, GEOS, PROJ) so please follow [{sf} installation instructions](https://github.com/r-spatial/sf/) to be sure to have those.
For Ubuntu users, ThinkR published a blogpost about [the installation of r 3 5 on Ubuntu 18.04 LTS and tips for spatial packages](https://rtask.thinkr.fr/installation-of-r-3-5-on-ubuntu-18-04-lts-and-tips-for-spatial-packages/)
```{r needed_libraries, eval=FALSE}
install.packages("dplyr")
install.packages("sf")
install.packages("spData")
install.packages("here")
install.packages("ggplot2")
install.packages("tmap")
install.packages("cartography")
```
For [OSGeoLive](https://live.osgeo.org) users, there is already some of them installed in the distribution.
Please start Jupyter Notebooks (Menu -> GeoSpatial -> Spatial Tools -> Jupyter Notebook). It should open a web page.
Click on `New` in the top right and start a new R Notebook. Then install only the following packages :
```r
install.packages("dplyr")
install.packages("here")
install.packages("tmap")
install.packages("cartography")
```
## About this document
This document had been written with the [R Bookdown package](https://bookdown.org/yihui/bookdown) and [Rstudio](https://www.rstudio.com). You can use the editor of your choice to follow the instruction, be careful on the path given by the {here} package.
To compile this example to PDF, you need XeLaTeX. You are recommended to install TinyTeX (which includes XeLaTeX): <https://yihui.name/tinytex/>.
You can contribute to this document on GitHub :
[https://github.com/Bakaniko/FOSS4G2019_Geoprocessing_with_R_workshop](https://github.com/Bakaniko/FOSS4G2019_Geoprocessing_with_R_workshop)
```{r setup, eval=T,echo=F,message=F,warning=F}
knitr::opts_chunk$set(cache=T,echo=T,comment="",message=F,warning = F)
# Load packages
library(knitr)
library(ggplot2)
library(here)
library(spData)
library(tidyverse)
library(sf)
library(tmap)
library(ggspatial)
# library(mapview)
theme_set(theme_gray())
tmap_mode("plot")
```
```{r include=FALSE}
# automatically create a bib database for R packages
knitr::write_bib(c(
.packages(), 'bookdown', 'knitr', 'rmarkdown'
), 'packages.bib')
```