The course will include a review of basic graphing functions in base R as they are used for creating maps. Students should have done this before, so it will be a review, but aimed at introducing GIS concepts. Afterwards, it will cover several R add-on packages which handle GIS data, and cover online tools to support maps. During each session, I will explain methods and present examples of their use, then students will work on assignments using these methods. Datasets will be provided, but students are encouraged to bring their own geographic data as well. A course web site will provide sample code, data, and a list of key R functions.
Students should
- have their own computer to work on during the sessions,
- have R and several packages already installed and working,
- know their computer's file system (ie, how to find files by typing the path plus file name),
- be familiar with R data.frames and simple graphing functions,
- and be familiar with ascii text files.
Schedule
- When: Three Sessions, 8AM-12noon, 11-13 February 2015
- Where: Tupper Large Meeting Room
Software required
- R base package from http://cran.us.r-project.org/
- A programming editor such as Geany (NOT Wordpad NOT Notepad) or ...
- ... or R Studio
- CTFS R Package from http://ctfs.arnarb.harvard.edu/Public/CTFSRPackage
- R contributed packages, available at http://cran.r-project.org/
- sp
- maptools
- spatstat
- splancs
- raster
- date
Web site at http://richardcondit/workshops/Rgis/tupper2015 including:
- An outline http://www.richardcondit.org/workshops/Rgis/tupper2015/index.html
- Sample R and csv datasets http://www.richardcondit.org/workshops/Rgis/data
- Assignments http://www.richardcondit.org/workshops/Rgis/tupper2015/assignments.html
- R scripts http://www.richardcondit.org/workshops/Rgis/tupper2015/Rscript.html
- History or R commands I enter during the course http://www.richardcondit.org/workshops/Rgis/tupper2015/history
Each will be updated regularly throughout the course.
Contents and approximate scheduling
- Area and point maps with R's base package [day 1]
- Plotting a data.frame with a line
- Overlaying points
- Polygon vs. line
- Structuring multiple polygons in a list
- GPSVisualizer [day 1]
- Creating maps with world coordinates and GPS Visualizer
- Showing your map on Google
- GIS tools in R [day 1]
- Package sp and classes for polygons, lines, points
- Subsetting the data
- Bounding box
- Maps
- Area
- Manipulating shape files [day 2]
- Creating Polygon objects
- Converting to UTM
- Area
- Raster maps with R's base package [day 3]
- Matrix data
- Contours
- Image
- GIS rasters in R [day 3]
- World elevation maps
- Package raster
- merge
- zoom
- crop
- plot
- Overlaying points or polygons
- Spatial analyses [day 4]
- Packages splancs, spatstat
- Nearest neighbor
- Point in polygon
- Autovariogram
- kriging
Principal R functions for GIS
- Basic mapping
- plot
- points
- line
- polygon
- identify
- abline
- box
- axis
- X11
- dev.set
- Raster graphs
- contour
- filled.contour
- image
- R GIS
- readShapePoly
- readShapeLines
- readShapePoints
- coordinates
- Spatial analyses
- nndist
- variogram