This repository hosts the code underlying the book An Introduction to Spatial Data Analysis and Statistics: A Course in R, by Antonio Paez:
Paez A (2021). An Introduction to Spatial Data Analysis and Statistics: A Course in R. McMaster Invisible Press. ISBN: 978-1-7778515-0-7
The book is free to read online at https://paezha.github.io/spatial-analysis-r.
I have created a set of presentation slides in mentimeter for each substantive chapter in the book. I use these as mini-lectures in a flipped classroom format in my course, but they can be used as a template for creating longer presentations or lectures.
Chapter | Mentimeter Slides | Static pdf file |
---|---|---|
Chapter 3 | Introduction to Mapping | |
Chapter 5 | Mapping in R Continued |
|
Chapter 7 | Maps as Processes | |
Chapter 9 | Point Pattern Analysis I | |
Chapter 11 | Point Pattern Analysis II | |
Chapter 13 | Point Pattern Analysis III | |
Chapter 15 | Point Pattern Analysis IV | |
Chapter 17 | Point Pattern Analysis V | |
Chapter 19 | Area Data I | |
Chapter 21 | Area Data II | |
Chapter 23 | Area Data III | |
Chapter 25 | Area Data IV | |
Chapter 27 | Area Data V | |
Chapter 29 | Area Data VI | |
Chapter 31 | Spatially Continuous Data I | |
Chapter 33 | Spatially Continuous Data II | |
Chapter 35 | Spatially Continuous Data III | |
Chapter 37 | Spatially Continuous Data IV |
I created a template repository to help students get started with the use of GitHub and R Markdown for collaborative work on term projects. In my own course adoption of this workflow is completely optional. Not every student/group has the inclination/time to adopt this approach, but those who do produce very professional-looking reports and learn valuable skills.
There will be some examples of projects in this repository.
An advantage of an Open Educational Resource compared to traditional publishing (besides it being free!) is that it is a live, ongoing project, for as long as anyone cares for it. If you are using this resource, I would encourage you to contribute to improve it, by:
- suggesting improvements to the text, e.g. clarifying unclear sentences, fixing typos (see guidance from Yihui Xie);
- proposing changes to the code, e.g. to do things in a more efficient way; and
- making requests to develop content (see the project’s issue tracker).
Many thanks to all contributors to the book so far via GitHub (this list will update automatically): Robinlovelace.
TODO <!--
To ease reproducibility, we created the geocompkg
package.
Installing it from GitHub will install all the R packages needed build the book (you will a computer with necessary system dependencies and the remotes package installed):
install.packages("remotes")
remotes::install_github("geocompr/geocompkg")
You need a recent version of the GDAL, GEOS, PROJ and UDUNITS libraries installed for this to work on Mac and Linux. See the sf package's README for information on that.
Once the dependencies have been installed you should be able to build and view a local version the book with:
bookdown::render_book("index.Rmd") # to build the book
browseURL("_book/index.html") # to view it
I think I got the binder to work.
TODO <!-- To ease reproducibility we have made Docker images available, at geocompr/geocompr on DockerHub. These images allow you to explore Geocomputation with R in a virtual machine that has up-to-date dependencies.
After you have installed docker and set-it up on your computer you can start RStudio Server without a password (see the Rocker project for info on how to add a password and other security steps for public-facing servers):
docker run -p 8787:8787 -e DISABLE_AUTH=TRUE geocompr/geocompr
If it worked you should be able to open-up RStudio server by opening a browser and navigating to http://localhost:8787/ resulting in an up-to-date version of R and RStudio running in a container.
Start a plain R session running:
docker run -it geocompr/geocompr R
See the geocompr/docker repo for details, including how to share volumes between your computer and the Docker image, for using geographic R packages on your own data and for information on available tags. -->
TODO
TODO