Assignment: Spatial Data Processing

This exercise will lead you through some of the most basic and important steps for spatial data processing.

Things you need for this worksheet

  • R — the interpreter can be installed on any operation system.
  • RStudio — we recommend to use R Studio for (interactive) programming with R.
  • Git environment for your operating system.
  • An internet connection for downloading raster and vector data (~5mb).

Spatial Data Processing

1) Create a map of your country of residence with the following features:

  • a raster background map showing elevation data,
  • a vector map showing the country boundary,
  • use the vector map to clip the raster map,
  • map point locations denoting the places of residence of the course participants in your country (if any), which you can enter here (use a SpatialPointsDataFrame object with the correct CRS for this task),
  • map the three largest cities of your selected country with different symbols, and
  • get bonus points by adding a legend, rivers, and other cartographic elements as well as
  • the distances of the places of residence to Marburg.

Use the code provided in the tutorial “Example: Workflow in R” from the previous page for this task. Save your R functions and Rmd file in your course repository, knitr it, update (i.e. commit) your local repository and publish (i.e. push) it to the GitHub classroom. Make sure that the created html file is also part of your GitHub repository and also include the text of each task prior to your solutions. Also make sure that the created map does not exceed 2mb file size.

2) Create your first HTML tutorial

Create your own markdown-based HTML tutorial for task 1), but this time avoid using functions from the packages sp and raster.

This assignment will a) get you ready for the more extensive student tutorials later in the course an will b) additionally prepare yourself for the end of life of the packages sp and raster, with which you have to deal in the future.

Do not use functions from the packages sp and raster for this task. Save your R functions and Rmd file in your course repository, knitr it, update (i.e. commit) your local repository and publish (i.e. push) it to the GitHub classroom. Make sure that the created html tutorial file is also part of your GitHub repository. You may copy the text in the tutorial “Example: Workflow in R” from the previous page for this task.