You are on page 1of 16

spatial.

org
Alex Mandel @aimandel aimandel@ucdavis.edu
August 17, 2017
What is Rspatial.org

A website to learn:

· spatial data
analysis
· spatial modeling

with R.

2/16
About: Who

· Dr. Robert Hijmans:
- author of raster, dismo, geosphere, etc…
- also creator of WorldClim and GADM data.
· Dr. Ani Ghosh - Remote Sensing
· Dr. Alex Mandel - Geoinformatics

Reviewed and tested by undergraduate and graduate
students.

3/16
About: What

Originally for Graduate level Quantitative Geography. Now for
undergraduates, academics, workshops around the world,
and you!

Explanations and Examples, not just a reference.

· Written in Rmarkdown,
· Embedded with R code.
· Knit(ed) to md,
· pandoc(ed) to rst
· compiled with Sphinx to html.

4/16
Intro to R

1. Introduction sapply and lapply
2. Basic data types
To iterate over a list, we can use lapply or sapply. The difference is
3. Basic data structures that lapply always returns a list while sapply tries to simplify the
4. Indexing result to a vector or matrix.
5. Algebra
6. Read and write files names <- list('Antoinette', 'Mary', 'Duncan', 'Obalaya')

7. Data exploration nchar('Jim')

8. Functions
9. Apply <---------------- ## [1] 3

10. Flow control
11. Data preparation
sapply(names, nchar)
12. Graphics
13. Statistical models
14. Miscellaneous ## [1] 10 4 6 7

5/16
Basics of Spatial Data in R

· Vector
· Raster
· Projections
· Making Maps

6/16
Spatial Data Analysis

· Distance
· Autocorrelation
· Interpolation
· Distribution Models
· Local Regression
· Spatial Regression
· Point Patterns
· Remote Sensing

7/16
Overview

· Intro to R · Spatial Data Analysis
· Basics of Spatial Data in R - Distance
- Vector - Autocorrelation
- Raster - Interpolation
- Coordinate References - Distribution Models
Systems (Projections) - Local Regression
- Making Maps
- Spatial Regression
- Point Patterns
- Remote Sensing

8/16
Overview: Packages

Packages used to make Rspatial.org, not including
dependencies.

deldir dismo fields

geosphere gstat kernlab

knitr latticeExtra maptools

RandomFields randomForest raster

rasterVis rgdal rgeos

rgl rpart sp

spatstat spdep spgwr

9/16
But wait, there's more

· Spherical
Computation
· Species
Distribution
Modeling
· Case Studies
- Example:
Measuring
Coastlines

10/16
Use it

Spatial Data Analysis and Modeling for Agricultural Development
· Arusha Tanzania, 2016
· 45 People, 6 Instructors, 5 Days
· http://gfc.ucdavis.edu/events/arusha2016

11/16
A few lessons

· Take a CRAN mirror with you, minicran, I put it on a POSM
(Portable OpenStreetMap) Intel NUC.
· Can always use more examples, local examples
· Pace yourself, takes lots of breaks
· Expect computer problems, design examples for low end
computers
· Power strips, surge protectors and extension cords
· 1 assistant per 5-10 students

12/16
Community Resource

· License
- Content: Creative Commons Attribution Share-Alike
- Code: TBD open source license (probably BSD or
GPLv2+)
· Contributions
- Copyright Assignment:
- You give us permission to use your material under
the above licenses.
- Retain copyright to do anything else you want.

13/16
In the works

· Openstreetmap
· Interactive Plots (think leaflet)
· Lidar
· Expanding examples
- more Machine Learning
- more Tips/Tricks to common problems
· Online, interactive coding/quizzes
· Ideas?

14/16
Acknowledgements

Major funding provided by

https://feedthefuture.gov
R logo by Hadley Wickham and others at RStudio

15/16
Contact

· View the material http://rspatial.org
· File issues, suggest improvements, pull requests, see, and
fork the code
- https://bitbucket.org/hijmans-lab/rspatial-web/
· Contact us biogeo@ucdavis.edu

16/16