Spatial Stream Network (SSN)

Spatial statistical models for streams provide a set of analytical tools that can be used to improve predictions of physical, chemical, and biological characteristics on stream networks. Spatial Stream Network (SSN) models are unique because they account for patterns of spatial autocorrelation among locations based on both Euclidean and in-stream distances. They also have practical applications for the design of monitoring strategies and the derivation of information from databases with non-random sample locations. Generating the spatial data needed to fit these statistical models requires practical skills in multiple disciplines including ecology, geospatial science, and statistics. Two sets of open source software tools have been developed to make the methods more accessible to users: SSNbler and SSN2.
Note: We conduct annual workshops to train users in application of the SSNbler and SSN2 software packages. For more information on these workshops contact Dan Isaak.
SSNbler: An R Package for Formatting Stream Network Data
The purpose of the SSNbler package is to generate and format the data needed to fit spatial statistical models in R software. The SSNbler package makes use of the Landscape Network, a data structure used to efficiently navigate throughout a stream network. Specific tools have been included to 1) pre-process the Landscape Network; 2) calculate the hydrologic distances (with flow-direction preserved), the spatial additive function used to weight converging stream segments, and the covariates for all observed and prediction locations in the stream network; and 3) export the topological, spatial, and attribute information in a format that can be efficiently stored, accessed, and analyzed in R. SSNbler is the successor to the now-retired STARS ArcGIS toolset.
SSN2: An R Package for Spatial Statistical Modeling on Stream Networks
The Spatial Stream Network (SSN2) package was developed for R statistical software, a powerful open-source statistical computing and graphics software. Once streams data have been properly formatted using the SSNbler toolset, the SSN package allows users to: 1) import and store their spatial data in R; 2) calculate pair-wise distances and spatial weights based on the network topology; 3) fit spatial statistical models to streams data where autocorrelation is based on three spatial relationships (Euclidean, flow-connected, and flow-unconnected); 4) estimate relationships between stream variables (spatial regression); 5) make predictions at unobserved locations (prediction sites); 6) export spatial data for use in other software programs; and 7) visualize the spatial data. SSN2 is the successor to the now-retired SSN package.
Acknowledgements
Support for this work was provided by the U.S. Forest Service, the U.S. Geological Survey, Bonneville Power Administration, and the Oregon State Office of the Bureau of Land Management. Some of this work was conducted as part of the working group entitled “Spatial Statistical Models for Stream Networks," supported by the National Center for Ecological Analysis and Synthesis, a center funded by NSF (Grant #EF-0553768), the University of California, Santa Barbara, and the State of California. This project also received financial support from the Australian CSIRO Water for a Healthy Country Flagship, and the NOAA's National Marine Fisheries Service to the Alaska Fisheries Science Center.
Software Requirements
R Statistical Software Requirements
| Software | Requirements | Source |
| R statistical software | R (≥ 3.5.x) | CRAN |
| SSN2 package >= 0.2.1 | R, Linux, Windows 64 bit, or MAC OS | Github or CRAN |
| SSNbler package >= 1.0.1 | R, Linux, Windows 64 bit, or MAC OS | Github or CRAN |
| Rtools | Optional. Required to install packages from source in Windows. | CRAN |
GIS Software Requirements
Most of the spatial data processing activities are undertaken using the SSNbler package in R Statistical Software. However, there are two steps that require GIS software:
- Checking and correcting errors in stream network topology
- Delineating reach contributing areas (RCAs)
Topology checking (1) is a critical step when processing data for use in spatial stream network models. Delineating RCAs is an optional processing step for many users and is not necessary if using the US National Stream Internet (NSI), NHDPlus V2, NHDPlus High Resolution datasets, or another attributed stream dataset. We’ve suggested both open source and proprietary GIS software options below. NOTE: You only need one GIS software.
QGIS
| Software | Requirements | URL for Instructions and/or Download |
| QGIS | Version ≥ 3.34 Long Term Release (LTR)1 | https://www.qgis.org/en/site/forusers/download.html |
WhiteboxTools QGIS Plugin | *Only needed for RCA Delineation in QGIS tutorial | Video instructions2: https://www.youtube.com/watch?v=xJXDBsNbcTg&t=3s |
| WhiteboxTools Open Core | *Only needed for RCA Delineation in QGIS tutorial | https://www.whiteboxgeo.com/geospatial-software/ |
1 Be sure to download the QGIS Long Term Release (LTR), not the newest Development version shown in the big green button. Instead, click on the text underneath the button that says, “Looking for the most stable version? Get QGIS <version number> LTR”.
2 To access QGIS Preferences on Windows, select Settings in the QGIS menu, scroll down and select Options. Follow all the additional instructions in the video.
ESRI ArcGIS ArcPro
| Software | Requirements |
| ArcGIS ArcPro | Version ≥ 3.0 is preferred. Tutorials have not been tested with version 2.x. Standard or advanced level license is required. |
| Spatial Analyst Extension | Needed to delineate reach contributing areas (optional step for most users) |
The following flow chart steps the user through the spatial data processing and spatial statistical modelling process using GIS, SSNbler, and the SSN2 package. A general description of these steps is provided below, along with links to tutorial and example datasets.

1. Data Preparation: Prepare input data including the stream network, observation sites, prediction sites, and covariate (i.e. predictor) data.
2. Topology Correction: Identify and correct topological errors, along with ensuring the topological assumptions required for modeling in SSN2 are met.
ArcGIS Pro topology tutorial and example data
QGIS topology tutorial & example data
3. RCA Delineation (Optional): Delineate reach contributing areas (RCAs) used to calculate covariates and other spatial variables used for spatial weights in the tail-up autocovariance function. Note that many users will already have these variables available and will not need to calculate RCAs.
QGIS RCA delineation tutorial and example data
4. Build LSN, Calculate Spatial Data, and Assemble SSN object: Using SSNbler to generate the spatial, topological, and attribute information needed to fit spatial stream network models in SSN2.
5. Exploratory Analysis, Modeling, and Prediction: Fit spatial statistical stream network models in R using SSN2.
Example Data
Additional example datasets have been pre-processed for use in SSN2, each accompanied by metadata files that describe the spatial features and attribute columns found within the datasets.
- Bugs (insect abundance example dataset)
- SpaceTime (space-time example dataset)
- MiddleForkTemperature (Middle Fork Salmon stream temperature dataset)
- MiddleForkTemeratureYear (Middle Fork Salmon stream temperature with years dataset)
- SaltRiver (Salt River block krige example dataset)
Other Software
The R Project for Statistical Computing
R is a free software environment for statistical computing and graphics. It compiles and runs on a wide variety of UNIX platforms, Windows and MacOS. The SSN package was developed for use with R.
The Comprehensive R Archive Network
The rdwplus package for R
The rdwplus package for R statistical software provides the functionality to calculate six spatially explicit watershed metrics that account for the Euclidean or flow length distance to the stream or outlet, as well as the probability for overland runoff. It is a fully open-source implementation of the IDW-PLUS (inverse distance weighted percent land use for streams) ArcGIS custom toolset described in Peterson and Pearse (2017), which is no longer supported. The rdwplus package is available for download from CRAN, with more the most recent version available on github. The rdwplus package can be used to generate a suite of spatially explicit watershed metrics including inverse Euclidean distance to the outlet and stream (iEDO and iEDS, respectively), inverse flow length to the outlet and stream (iFLO and iFLS, respectively), and the hydrologically active inverse flow length to the outlet and stream (HAiFLO and HAiFLS, respectively).
Key Personnel
FS Project Contact
-
Person
Daniel J. Isaak, PhD
Research Fish Biologisthttps://research.fs.usda.gov/about/people/daniel.isaak
Collaborators
-
EP Consultinghttps://www.peterson-consulting.com/
-
NOAA National Marine Mammal Laboratoryhttps://sites.google.com/site/jayverhoef/
-
US EPA Office of Research and Developmenthttps://cfpub.epa.gov/locator/in_details.cfm?LAST_NAME=Williams&FIRST_NAME=Aresia&MAIL_CD=7408M&SITE_CD=HQ&SITE_DESC=HEADQUARTERS&search=1&sort=6&ASSOC_PK=16080&tab=search
-
Person
David E. Nagel
Physical Scientist/Spatial Analysthttps://research.fs.usda.gov/about/people/david.nagel -
Person
Dona Horan
Fish Biologisthttps://research.fs.usda.gov/about/people/dona.horan -
Person
Sherry P. Wollrab
Ecologisthttps://research.fs.usda.gov/about/people/sherry.p.wollrab -
Person
Sharon L. Payne
RMRS GIS Specialist and W&W Web Managerhttps://research.fs.usda.gov/about/people/sharon.l.payne -
Person
Gwynne L. Chandler
Fish Biologisthttps://research.fs.usda.gov/about/people/gwynne.chandler