B BGU course 2019

Last updated: 2020-08-12 00:41:46

B.1 Course aims

  • General knowledge in programming
  • Overview of spatial data processing and analysis in R

B.2 Course details

  • Course number: 128.1.0043
  • Time: Sunday 16:10-19:00
  • Place: Building 35, room 401
  • Instructor: Michael Dorman (dorman@post.bgu.ac.il)
  • Grading: 6 exercises (50%) + exam (50%)
  • Requirements:
    • Basic knowledge of GIS (e.g., “Intro to GIS” course)
    • Self study
  • Getting help:

B.4 Exercise submission dates

Exercise Date
Exercise 1 2019-11-17
Exercise 2 2019-12-01
Exercise 3 2019-12-15
Exercise 4 2020-01-05
Exercise 5 2020-01-19
Exercise 6 2020-02-09

B.5 Exercise instructions

B.5.1 Guidelines

  • Submission is through Moodle only
  • The submission should be a single R code file
  • File name is your last name + exercise number, such as dorman_01.R
  • The code needs to run as is, assuming that:
    • All required packages are installed
    • All data files are in the user’s working directory
  • Do not include install.packages expressions
  • Do include library expressions
  • Do not include setwd expressions
  • Self-check:
    • Start a new R session
    • Manually set the working directory to where the data files are
    • Run the entire script
  • Late submission up to -20%, and additional -10% per week, unless coordinated in advance
  • The code file should include the exercise number, your first name and last name (as comments), and mark the relevant code sections for each question (using comments). The necessary library expressions can be placed at the beginning of the script. For example:

B.5.2 Generality

  • The code needs to be as general as possible:
    • Do not use specific values except the ones given in the question
    • When there are intermediate results—assign them to a variable and use the variable, not the value
  • Question: what is the last value of c(5,3,1,7,2,3,2,6)?
  • Good solution:
  • Bad solution:

B.5.3 Brackets

  • Use brackets to make sure the right order of operations is done
  • Question: print the subset of the last four values in c(5,3,1,7,2,3,2,6)
  • Correct solution:
  • Wrong solution:

B.5.4 Required value or output

  • Note which outputs or printouts are requested

B.5.5 Packages

  • Do not use the sp, rgeos, rgdal and raster packages in the exercises.

B.6 Using the virtual environment in computer room

A PDF with detailed instructions (by Dor Fridman) can be found here.

  • Step 1: Open the web browser and browse to apps.bgu.ac.il. Log in with your University e-mail and password (Figure B.1).
Step 1

Figure B.1: Step 1

  • Step 2: Click on your user name (in the top-right corner) and click on Settings (Figure B.2).
Step 2

Figure B.2: Step 2

  • Step 3: Inside the Settings, go to Preferences (Figure B.3).
Step 3

Figure B.3: Step 3

  • Step 4: Choose Horizon Client (Figure B.4).
Step 4

Figure B.4: Step 4

  • Click on Geography to launch the virtual environment (Figure B.5).
Step 5

Figure B.5: Step 5

B.7 Resources

B.7.1 Books: General

  • Murrell, P. (2010). Introduction to Data Technologies. Chapman and Hall/CRC. [PDF] [Website]
  • Wickham, H. (2014). Advanced R. Chapman and Hall/CRC. [HTML]

B.7.2 Books: Spatial data

  • Hengl, T. (2009). A Practical Guide to Geostatistical Mapping. [PDF]
  • Lovelace, R., Nowosad, J., Muenchow, J. (2019). Geocomputation with R. Chapman and Hall/CRC. [HTML]
  • Pebesma, E., Bivand, R. (in preparation). Spatial Data Science. [HTML]