```{r libraries, include = FALSE}
library(foreign) # Needed to open .dbf file
library(knitr) # Kable tables
require(useful) # for angle calculations
library(gstat) # IDW
if (!require("rspatial")) remotes::install_github('rspatial/rspatial', upgrade = TRUE)
library(rspatial) # Rasterize points
library(data.table)
library(car)
library(graphics)
library(tidyverse)
library(sf)
library(sp)
library(stars)
library(fields)
library(dismo)
library(rgdal)
library(foreach)
library(doParallel)
library(grid)
library(gridExtra)
library(lattice)


grid_dim <- 500
sub_samp <- 150
k_folds <- 4
deff_ittr <- 1
```

Assignment Part B

Part B: Validation of Interpolated Surfaces

In this part, you will generate two surfaces from the same sample points using three different methods, Inverse Distance Weighting (IDW), Spline and Kriging. You will create rainfall surfaces, and compare these to points of known rainfall to determine how good the interpolation techniques predicted the rainfall at these locations.

You will use a single set of rainfall observations but for the interpolation you will use K-Folds evaluate the interpolated surfaces. This data has been seperated into 90pct and 10pct, merge these files before proceding!

The data files are in the Rainfall subfolder.

Add the pts90percent.shp and pts10percent.shp files to a new data frame. The data are projected and the map units are in meters. As we will be using K-Fold validation merge these layers before proceeding

IDW

The first technique you will use is IDW
Deliverable 10: make an interpolated raster of Rainfall.

Kriging

The second technique you will use is Kriging
Deliverable 11: make an interpolated raster of Rainfall.

Analysis

Using K-Fold validation with 4 folds report the RMS error of each of the surfaces.
Deliverable 12: RMS error of each of the surfaces

Grading Rubic

QuestionPoints
10.15
20.25
30.1
40.25
50.25
60.25
70.25
80.25
90.25
101
111
121
Categories: GEOG 413Labs