Notes from A Recent Spatial R Class I Gave

June 19, 2012
By

[This article was first published on Frank Davenport's Blog on R, Statistics, and all Things Spatial - R, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Below is a link to a pdf (compiled with the amazing knitr package) and some accompanying data for a recent short course I gave on basic spatial data import/analysis/visualization in R. The class was only two hours and some of the participants were being exposed to R for the first time so the material is limited. The class was a follow up to a previous one I did on ArcGIS. The idea was to show how to perform the same functions in R and ArcGIS and then let users decide which worked best for them (I use R for about 90% of my spatial analysis and data handling but find ArcGIS (or some GUI based GIS) pretty essential for that last 10%). 

The content/main points of the course:

  • Basic intro to R
  • Reading in a Shapefile
  • Doing a table join with a shapefile and a data.frame
  • Generating random points
  • Doing a point in polygon spatial join
  • Reading and cropping raster data
  • Doing a pixel in polygon spatial join (using extract() from the raster pacakge)
  • Plotting and annotating a shapefile in ggplot2
  • Making panel maps in ggplot2

The notes contain all the R-code and a lot of grammatical and spelling errors. I hope to improve and update this class over time. Please let me know if:

  1. You find the material useful
  2. You use it/modify for a class of your own (and please share the results)
  3. You have any major suggestions for improvements (I’m aware of most of the minor issues)

 

To leave a comment for the author, please follow the link and comment on their blog: Frank Davenport's Blog on R, Statistics, and all Things Spatial - R.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Tags: , ,

Comments are closed.

Search R-bloggers

Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)