Skip to content

fwanjala/spatialTutorial

 
 

Repository files navigation

Spatial Data in R Tutorial

This tutorial serves as a two part introduction to working with spatial data in R. You'll work through four files - 1) spatdatanotes(1 and 2).nb.html and 2) spatdataexercises(1 and 2).nb.html. It's best to work through the first part of spatdatanotes before the first part of spatdataexercises, and then to proceed to the second part of each.

The first part will be focused on getting started (getting R installed, getting some useful packages installed) and understanding how spatial data is stored and can be manipulated. In the second part, we'll start to focus on analysis and visualization of spatial data in R.

There are two objectives to the first part. First, you'll have R, RStudio, and some packages installed for working with spatial data, and you'll be able to copy-paste your way through some "Hello world!" style examples. Second, you'll have a conceptual understanding of spatial data, and how it's stored in shapefiles and in R.

The main objective of the second part is giving you the basic tools to start working with spatial data in R. You'll be able to visualize a shapefile, conduct some simple analysis (centroids, areas, distance matrix), and manipulate it (buffer, intersections, unions).

Currently, spatdatanotes2.nb.html is ignored because it (along with the data folder) contain private data. This will be corrected in a future version. For now, in the tutorial I'll provide you with the data via USB/Dropbox link, and you'll be asked to delete it after the lesson. Additionally, you'll be able to work through spatdatanotes2.Rmd instead.

Note that spatdataexercises(1 and 2).Rmd contain the solutions missing from spatdataexercises(1 and 2).nb.html, so please try not to view these document while you're working through the exercises. However, you should run the code as you go through the .Rmd file in the notes, but you should work separately with the .html as your guide for the exercises.

About

Introduction to working with spatial data in R

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • HTML 100.0%