R Spatial Analysis Notes
Spatial Analysis in
sp- defines the set of base classes for spatial data in R. Most useful for creating, converting, merging, transforming (e.g. projection), and plotting (see
rgdal- wrapper for GDAL. Most useful for reading in vector data (e.g. ESRI Shapefiles, GeoJSON, KML) with the function
readOGRand reading raster data (e.g. NetCDF, GeoTiff) with the function
rgeos- wrapper for the GEOS library. Most useful for common spatial operations such as calculating distances between objects, areas, intersections, buffers, centroids, etc. See
help(package = "rgeos")for a complete list of functions.
raster- provides a set of object classes and functions specific to working with raster data. Most useful for loading, transforming, and analyzing raster data. A particularly useful function
getDataretrieves commonly used spatial data such as administrative boundaries or world climate data.
R Spatial Resources
- "Applied Spatial Data Analysis with
R" [Book Website][Springer Link] by Roger S. Bivand, Edzer Pebesma, and Virgilio Gómez-Rubio. Perhaps the best and most comprehensive introduction to
Rby the authors of the
- CRAN Task View: Analysis of Spatial Data - lists available
Rpackages by spatial application.
- Stack Overflow Geographic Information Systems - Invaluable Q&A community and knowledge base. This is often the best place to look for solutions to a specific but common task.
- Visual Raster Cheatsheet by Etienne B. Racine
R Spatial Tutorials
- Applied Spatial Data Science with
Rby Daniel Emaasit
- Introduction to visualising spatial data in
Rby Robin Lovelace and James Chesire.
- GIS in
Rby Nick Eubank
- Spatial data in
Ras a GIS by Francisco Rodriguez-Sanchez
RSpatial Tips - spatial.ly by James Cheshire.
RSpatial Cheatsheet by Barry Rowlingson
- Geocoding with
ggmapPackage by Zev Ross
- plotting polygon shapefiles with
Spatial Visualization and Mapping
- Making Maps in
Rby Kevin Johnson
- Mapping in
ggplot2package by Zev Ross
- Introduction to Spatial Data and
ggplot2by James Chesire
R— Working with Geospatial Data (and
ggplot2) by Bethany Yollin
- Making Maps with
Rby Kim Gilbert
- Create Maps With
RGeospatial Classes and Graphics Tools - UCSB National Center for Ecological Analysis and Synthesis
- Spatial maps and geocoding in
Rby Aedin Culhane
choroplethrby Ari Lamstein (choropleth mapping)
- In addition to the GitHub documentation, Lamstein has many tutorial and examples in his blog
- The very basics of
R- UCLA Statistics
RTutorial by Kelly Black
RReference Card (excellent coverage of commonly used base
- RStudio Cheatsheets (RStudio IDE, visualization, data cleaning, etc.) by RStudio
- A section on
RBasics from "
RGraphics Cookbok" by Winston Chang
RGraphics Cookbook by Winston Chang
- dplyr introduction (powerful tools for processing, cleaning, and analyzing tabular data) by Hadley Wickham
- stargazer cheatsheet (publication quality formatting for regression results) by Jake Russ
- knitr resources (dynamic document compilation / reproducible research) by Yihui Xie.
- packrat (dependency management / reproducibility tool) by RStudio.
- Advanced R by Hadley Wickham
- R Packages (package development) by Hadley Wickham
General GIS Resources
- GIS Analysis for Applied Economists by Melissa Dell.
General Data Analysis Resources
- Tidy Data Wickham (2014). Journal of Statistical Software.