Learn R Programming

dci

Overview

The dci package provides an R interface to the Dendritic Connectivity Index (DCI) allowing for the analysis of longitudinal connectivity in river networks. Given a set of spatial data representing river lines, barrier point locations and the location of the target watershed's outlet the dci package provides tools to calculate ecological connectivity with the DCI. There are options to calculate the potamodromous or diadromous form of the DCI as well as options to consider a distance threshold and/or weights to be applied to river lengths.

This package extends the tidy representation of geospatial network data from the sfnetworks package. This provides access to a rich set of further network analysis tools from the tidygraph package as well as data manipulation from the tidyverse family of packages.

Installation

Development version

To install the development version of the dci package from this github page follow these instructions:

require(devtools)
install_github("aarkilanian/dci")

Copy Link

Version

Install

install.packages('dci')

Monthly Downloads

151

Version

1.0.2

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Alex Arkilanian

Last Published

June 13th, 2025

Functions in dci (1.0.2)

import_rivers

Prepare rivers for connectivity analyses
rename_geometry

Rename sf geometry column
join_attributes

Join variables from network nodes to river_net object.
import_points

Prepare point data for connectivity analyses
node_labeling

Label nodes with logical vector binary IDs
split_rivers_at_points

Split river lines around point locations
yamaska_barriers

Barrier point features for the Yamaska watershed
gather_perm

Gather passability between two nodes
node_labeler

Node labeling function passed to map_bfs
yamaska_rivers

River line features for the Yamaska watershed
river_net

Create a river_net Object
path_to_root

Find the path to the root (outlet) of the river network
path_between

Find the path between two nodes
yamaska_net

River network for the Yamaska watershed
yamaska_outlet

Outlet point feature for the Yamaska watershed
calculate_dci

Calculate DCI for a river_net Object
calculate_dci_dia_thresh

Calculate thresholded diadromous DCI
enforce_dendritic

Enforce dendritic river topology
export_dci

Export DCI Results to Spatial Format
calculate_dci_pot_thresh

Calculate non-thresholded invasive DCI
correct_divergences

Correct river divergences
calculate_dci_pot

Calculate non-thresholded potamodromous DCI
gather_dci

Calculate thresholded invasive DCI
dci-package

dci: Calculate the Dendritic Connectivity Index in River Networks
calculate_dci_dia

Calculate non-thresholded diadromous DCI
membership_labeler

Membership labeling function passed to map_bfs
membership_labeling

Label nodes with integer segment member ID
correct_complex

Correct complex confluences
gather_dist

Gather total distance between two nodes