Chapter 11 Interpolation with Array of Things Data

11.1 Overview

This workshop continues teaching interpolation in R using Array of Things data. This is based on Part 2 of the Array of Things workshop put together by Marynia Kolak at the CSDS.

11.2 Download data

Please download data for this workshop by going to the following link and right-clicking on “Raw”, then saving the link as a CSV on your computer.

Or, you can run the following code in your console:

download.file("", destfile = "node-temps.csv")

Also download a copy of the Chicago Community Area data here, or use the API Endpoint (copy and paste into your console).

areas <- st_read("")
## Reading layer `igwz-8jzy' from data source `' using driver `GeoJSON'
## Simple feature collection with 77 features and 9 fields
## geometry type:  MULTIPOLYGON
## dimension:      XY
## bbox:           xmin: -87.94011 ymin: 41.64454 xmax: -87.52414 ymax: 42.02304
## epsg (SRID):    4326
## proj4string:    +proj=longlat +datum=WGS84 +no_defs


Read in the csv as an sf object, then explore it using exploratory data functions like head(), str(), summary(), and plot()


Try making a map of the nodes, with the community areas, using ggplot2.


Convert the sf object into an sp object. Hint: as_Spatial(sf) should do the trick.


Make an empirical variogram of the data.


Krige! Try out a few types of models: spherical, exponential, and linear.