connectivity: connectivity

Description Usage Arguments Details Value References Examples

View source: R/connectivity.R

Description

Calculate thermal connectivity and potential for temperature change.

Usage

1
connectivity(img, conn_threshold = 1.5)

Arguments

img

A numeric temperature matrix (such as that returned from Thermimage::raw2temp) or raster.

conn_threshold

Climate threshold to use for calculation of thermal connectivity (i.e. the amount of change that organisms would be seeking to avoid).

Details

This measure of climate connectivity and potential for temperature change is analogous to that described in McGuire et al. 2016. The basic premise is that there is a degree of change that organisms are seeking to avoid, and when pixels are sufficiently heterogenous and well connected organisms can move through the pixels to avoid deleterious temperature change.

Value

A dataframe (one row for each pixel) containing:

x,y

The original spatial location of the pixel

val

The pixel value

pixel

The unique id given to the pixel

dest_pixel

The id of the final destination pixel

dest_val

The value of final destination pixel

inter_pixel

The intermediate pixels traversed from origin to destination pixel

diff_potential

The potential for change achieved by following gradient from hotter to cooler pixels

therm_conn

Thermal connectivity, calculated as the maximum potential change (diff_potential) minus conn_threshold. Where this value is positive, connectivity of the starting pixel is sufficient to avoid the specified threshold of warming. See details.

References

McGuire, J. L., Lawler, J. J., McRae, B. H., Nunez, T. A. and Theobald, D. M. (2016), Achieving climate connectivity in a fragmented landscape. PNAS, 113: 7195-7200. https://doi.org/10.1073/pnas.1602817113

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# Define matrix as FLIR thermal image
img <- flir11835$flir_matrix

# Get connectivity
img_conn <-
connectivity(img = img,
             conn_threshold = 1.5)
head(img_conn)

# Plot the potential for temperature change
library(ggplot2)
ggplot(img_conn, 
       aes(x = x, y = y, fill = diff_potential))+
    geom_raster() +
    scale_fill_viridis_c()

rasenior/ThermStats documentation built on Oct. 31, 2020, 3:48 p.m.