Skip to contents

Creates a parameterised Quarto report from connectivity analysis results.

Usage

generate_connectivity_report(
  species_name,
  interpatch_distances,
  results_connect_habitat,
  areas_connected,
  habitat = NULL,
  barrier = NULL,
  habitat_raster = NULL,
  data_resolution = 10,
  output_file = NULL,
  output_format = c("html", "pdf", "both"),
  output_dir = getwd()
)

Arguments

species_name

Character. Name of the species being analysed.

interpatch_distances

Numeric. The distances (in meters) where habitat patches are considered connected. E.g., if set to 500, patches 498m apart are connected, those 501m apart are not connected. This is passed internally to a spatial operation known as "buffering", where this distance is used as a radius from the edge of the habitat zone. This means the specified interpatch_distance is halved exactly. So an interpatch distance of 500 will be converted to 250.

results_connect_habitat

Data frame. Connectivity summary results.

areas_connected

List of data frames. Connected patch areas for each interpatch distance.

habitat

SF object. Habitat spatial data (optional, for mapping).

barrier

SF object. Barrier spatial data (optional, for mapping).

habitat_raster

Terra SpatRaster. Habitat raster (optional, for mapping).

data_resolution

Numeric. Data resolution in meters.

output_file

Character. Output filename (without extension).

output_format

Character. Output format: "html" (default), "pdf", or "both".

output_dir

Character. Directory to save the report (default: current directory).

Value

Character vector of generated report file path(s).

Examples

if (FALSE) { # \dontrun{
report_path <- generate_connectivity_report(
  species_name = "Superb Fairy Wren",
  interpatch_distances = c(100, 250, 400),
  results_connect_habitat = results_df,
  areas_connected = patches_list,
  output_format = "html"
)
} # }