circuitscaper

[R PACKAGE] An R interface for circuit-theory landscape connectivity modeling

circuitscaper

Overview

circuitscaper is an R package for modeling landscape connectivity using circuit theory. The package wraps two high-performance open source Julia tools: Circuitscape, which computes connectivity between specific focal sites, and Omniscape, which maps connectivity continuously across an entire landscape. I have no affiliation with these Julia tools, but they’re powerful and widely used for ecology and conservation, and I wanted to make them accessible in R because interfacing with Julia is a barrier. circuitscaper lets you run these entirely from R, passing terra raster objects as inputs and outputs while Julia handles the computation under the hood.

The idea behind circuit-theory based connectivity models is to treat the landscape as an electrical circuit: each raster cell is a node, adjacent cells are connected by resistors, and current flowing through the network reveals movement patterns. Unlike least-cost path methods, which find only the single cheapest route, circuit theory considers all possible pathways simultaneously, making it especially effective at identifying movement corridors and pinch points. circuitscaper supports pairwise, one-to-all, all-to-one, and advanced Circuitscape modes, as well as Omniscape’s moving-window approach for wall-to-wall connectivity mapping.

Resources

circuitscaper is available on CRAN. You can install it with:

install.packages("circuitscaper")
library(circuitscaper)
cs_install_julia()   # installs Julia and required packages (first time only)