Skip to contents

Summarize Acres of Overlay Features within HUC12 Watersheds

Usage

summarize_acres_by_huc12(
  huc12,
  overlay,
  huc_id_col = "huc12",
  group_vars = NULL
)

Arguments

huc12

An sf object representing HUC12 watersheds

overlay

An sf object representing layers to be summarized (e.g., wetlands) if overlay is polygon it calculates acres, if point it just returns a count

huc_id_col

The name of the column identifying each HUC12 unit (default: "huc12")

group_vars

Optional character vector of additional grouping columns from the overlay layer (e.g., c("wetland_type"))

Value

A data frame summarizing acres by HUC12 and optional groupings

Examples

if (FALSE) { # \dontrun{

huc12 <- get_geoserver_layer("all_columbia_huc_12s")
geohazards <- get_geoserver_layer("columbia-geologic-hazard")

geohaz_acres <- summarize_acres_by_huc12(huc12 = huc12,
overlay = geohazards, group_vars = "forpehrtdc")
} # }