Type to search
Geocomputation with R
Welcome
How to contribute?
Reproducibility
Supporting the project
Foreword
Preface
Who this book is for
How to read this book
Why R?
Real-world impact
Acknowledgements
1
Introduction
1.1
What is geocomputation?
1.2
Why use R for geocomputation?
1.3
Software for geocomputation
1.4
R’s spatial ecosystem
1.5
The history of R-spatial
1.6
Exercises
I Foundations
2
Geographic data in R
Prerequisites
2.1
Introduction
2.2
Vector data
2.2.1
An introduction to simple features
2.2.2
Why simple features?
2.2.3
Basic map making
2.2.4
Base plot arguments
2.2.5
Geometry types
2.2.6
Simple feature geometries (sfg)
2.2.7
Simple feature columns (sfc)
2.2.8
The sf class
2.3
Raster data
2.3.1
An introduction to raster
2.3.2
Basic map making
2.3.3
Raster classes
2.4
Coordinate Reference Systems
2.4.1
Geographic coordinate systems
2.4.2
Projected coordinate reference systems
2.4.3
CRSs in R
2.5
Units
2.6
Exercises
3
Attribute data operations
Prerequisites
3.1
Introduction
3.2
Vector attribute manipulation
3.2.1
Vector attribute subsetting
3.2.2
Vector attribute aggregation
3.2.3
Vector attribute joining
3.2.4
Creating attributes and removing spatial information
3.3
Manipulating raster objects
3.3.1
Raster subsetting
3.3.2
Summarizing raster objects
3.4
Exercises
4
Spatial data operations
Prerequisites
4.1
Introduction
4.2
Spatial operations on vector data
4.2.1
Spatial subsetting
4.2.2
Topological relations
4.2.3
Spatial joining
4.2.4
Non-overlapping joins
4.2.5
Spatial data aggregation
4.2.6
Distance relations
4.3
Spatial operations on raster data
4.3.1
Spatial subsetting
4.3.2
Map algebra
4.3.3
Local operations
4.3.4
Focal operations
4.3.5
Zonal operations
4.3.6
Global operations and distances
4.3.7
Map algebra counterparts in vector processing
4.3.8
Merging rasters
4.4
Exercises
5
Geometry operations
Prerequisites
5.1
Introduction
5.2
Geometric operations on vector data
5.2.1
Simplification
5.2.2
Centroids
5.2.3
Buffers
5.2.4
Affine transformations
5.2.5
Clipping
5.2.6
Geometry unions
5.2.7
Type transformations
5.3
Geometric operations on raster data
5.3.1
Geometric intersections
5.3.2
Extent and origin
5.3.3
Aggregation and disaggregation
5.4
Raster-vector interactions
5.4.1
Raster cropping
5.4.2
Raster extraction
5.4.3
Rasterization
5.4.4
Spatial vectorization
5.5
Exercises
6
Reprojecting geographic data
Prerequisites
6.1
Introduction
6.2
When to reproject?
6.3
Which CRS to use?
6.4
Reprojecting vector geometries
6.5
Modifying map projections
6.6
Reprojecting raster geometries
6.7
Exercises
7
Geographic data I/O
Prerequisites
7.1
Introduction
7.2
Retrieving open data
7.3
Geographic data packages
7.4
Geographic web services
7.5
File formats
7.6
Data input (I)
7.6.1
Vector data
7.6.2
Raster data
7.7
Data output (O)
7.7.1
Vector data
7.7.2
Raster data
7.8
Visual outputs
7.9
Exercises
II Extensions
8
Making maps with R
Prerequisites
8.1
Introduction
8.2
Static maps
8.2.1
tmap basics
8.2.2
Map objects
8.2.3
Aesthetics
8.2.4
Color settings
8.2.5
Layouts
8.2.6
Faceted maps
8.2.7
Inset maps
8.3
Animated maps
8.4
Interactive maps
8.5
Mapping applications
8.6
Other mapping packages
8.7
Exercises
9
Bridges to GIS software
Prerequisites
9.1
Introduction
9.2
(R)QGIS
9.3
(R)SAGA
9.4
GRASS through
rgrass7
9.5
When to use what?
9.6
Other bridges
9.6.1
Bridges to GDAL
9.6.2
Bridges to spatial databases
9.7
Exercises
10
Scripts, algorithms and functions
Prerequisites
10.1
Introduction
10.2
Scripts
10.3
Geometric algorithms
10.4
Functions
10.5
Programming
10.6
Exercises
11
Statistical learning
Prerequisites
11.1
Introduction
11.2
Case study: Landslide susceptibility
11.3
Conventional modeling approach in R
11.4
Introduction to (spatial) cross-validation
11.5
Spatial CV with
mlr
11.5.1
Generalized linear model
11.5.2
Spatial tuning of machine-learning hyperparameters
11.6
Conclusions
11.7
Exercises
III Applications
12
Transportation
Prerequisites
12.1
Introduction
12.2
A case study of Bristol
12.3
Transport zones
12.4
Desire lines
12.5
Routes
12.6
Nodes
12.7
Route networks
12.8
Prioritizing new infrastructure
12.9
Future directions of travel
12.10
Exercises
13
Geomarketing
Prerequisites
13.1
Introduction
13.2
Case study: bike shops in Germany
13.3
Tidy the input data
13.4
Create census rasters
13.5
Define metropolitan areas
13.6
Points of interest
13.7
Identifying suitable locations
13.8
Discussion and next steps
13.9
Exercises
14
Ecology
Prerequisites
14.1
Introduction
14.2
Data and data preparation
14.3
Reducing dimensionality
14.4
Modeling the floristic gradient
14.4.1
mlr
building blocks
14.4.2
Predictive mapping
14.5
Conclusions
14.6
Exercises
15
Conclusion
Prerequisites
15.1
Introduction
15.2
Package choice
15.3
Gaps and overlaps
15.4
Where to go next?
15.5
The open source approach
References
Robin Lovelace
Jakub Nowosad
Jannes Muenchow
A
A
Serif
Sans
White
Sepia
Night
Geocomputation with R
References