Custom Python-R script tool for ESRI’s ArcGIS

Gridded Extremes

Back in 2013, I started exploring the integration between ArcGIS and R to create my own custom analysis tools. On one hand, coming from the R world, I was simply curious to explore a new way to make the two programming architectures (Python and R) talk to each other. On the other hand, I wanted to take advantage of the plethora of statistical packages available in R. At the time, the only way to have ArcGIS and R talk to each other was to (1) create a Python script reading user parameters from the ArcGIS GUI, (2) calling the R executable to run an R script containing the bulk of the analysis, and (3) sending the result back to the Python script and ArcGIS for visualization. This integration is now much more advanced, thank to the R-ArcGIS Bridge. Through the Bridge, one can seamlessly transfer data back and forth between ArcGIS and R, which allows you the ability to take full advantage of all of the libraries and functions in R as a complement to the spatial analysis and mapping powers of ArcGIS. If you are interested in reading more about the R ArcGIS bridge, read this blog post.

My first ArcGIS-R tool back in 2013 was developed to:

  • Build a user-interface to allow any user to run extreme value models on gridded data, i.e. Rasters in GIS jargon
  • Automatically run extreme models pixel by pixel in order to estimate return levels from a series of temporal raster images
  • Interface Python and R within the ArcGIS software

This custom ArcGIS toolbox only contains the block maxima/minima approach to extreme value analysis. Future versions may include tools such as exploratory ACF/PACF analysis or the peak-over-threshold (POT) approach to extreme values. The current tool assumes stationarity in the temporal sequence of values. Given a sequence of temporal raster images, this tool runs the block maxima (minima) approach in order to calculate return levels for the desired return period(s). The script tool uses external R software routines for all calculations.

View Related Code on GitHub