Slicing up gridded data with geoknife

Submitted by editor on 30 October 2015. Get the paper!
Figure 1: geoknife output from processing the PRISM dataset (Daly et al. 1994) according to ecoregion. Mean monthly precipitation for the month of May is shown here.

By Jordan Read


Downloading huge datasets for desktop processing can eat network bandwidth and also pose a challenge for local data storage and analysis. We created the geoknife R package to provide a reproducible way to subset or summarize large datasets to your area(s) of interest before they ever make it into a local processing environment. geoknife creates geo-processing requests that are carried out on a remote server, and lets you download the result or load it into R.


The package focuses on tasks that are common to many ecological workflows: sampling gridded data relative to overlap with irregular features, including research plots, watersheds, and states/ecoregions. These tasks can be computationally intensive and error-prone when it comes to dealing with multiple datasets in different coordinate reference systems. 

Figure 2: Timeseries outputs from figure one shown for three ecoregions.


Our paper “geoknife: Reproducible web-processing of large gridded datasets” details several example use-cases for processed gridded data from the web, complete with executable example R code. Figure 1 shows the result of a simple geoknife processing request plotted as monthly mean precipitation during the 30-year period 1980-2009 from the PRISM dataset (Daly et al. 1994) for the U.S. ecoregions. Figure 2 is the same result plotted as a timeseries for a subset of the same ecoregions. geoknife returns data in various formats including text (e.g., as a csv file), R data.frame netCDF, and geotiff (for the examples shown here, plots were created from geoknife data.frame outputs). Check out our paper or the vignettes included in the geoknife R package for details on other analyses, such as the use of global data and retrieving data subsets. 


The geoknife package is free and open source, and under a CC0 license. Versioned source code is available on The package can be installed directly into the R environment from the Comprehensive R archive network (CRAN) using the R command: install.packages('geoknife').