Skip to contents

This function summarizes raster-based cropland data within each HUC12 polygon, returning acreage by crop type per watershed.

Usage

summarize_crops_by_huc12(crops_rast, huc12)

Arguments

crops_rast

A SpatRaster object representing crop types (e.g., from CDL)

huc12

An sf object of HUC12 watershed boundaries with a unique "name" column

Value

A tibble with columns: ID, name, crop, crop_name, n_pixels, acres