Learn R Programming

manureshed (version 0.1.3)

agri_classify_complete_custom: Complete Agricultural Classification Pipeline with Custom Efficiency Factors

Description

Run complete agricultural nutrient classification analysis for both N and P with user-specified efficiency factors for sensitivity analysis.

Usage

agri_classify_complete_custom(
  nugis_data,
  scale,
  cropland_threshold = NULL,
  county_data = NULL,
  n_efficiency = 0.5,
  p_efficiency = 1
)

Value

Data frame with complete agricultural classifications for both nutrients

Arguments

nugis_data

Data frame. Raw NuGIS data

scale

Character. Spatial scale: "county", "huc8", or "huc2"

cropland_threshold

Numeric. Optional custom threshold

county_data

Data frame. County data for threshold calculation (if needed)

n_efficiency

Numeric. Nitrogen efficiency factor (default: 0.5)

p_efficiency

Numeric. Phosphorus efficiency factor (default: 1.0)

Examples

Run this code
# \donttest{
# Load county data
nugis_data <- load_builtin_nugis("county", 2016)

# Standard analysis
results_standard <- agri_classify_complete_custom(
  nugis_data, "county"
)

# Sensitivity analysis with varied nitrogen efficiency
results_high_n <- agri_classify_complete_custom(
  nugis_data, "county",
  n_efficiency = 0.7
)

# Analysis with both custom efficiencies
results_custom <- agri_classify_complete_custom(
  nugis_data, "county",
  n_efficiency = 0.6,
  p_efficiency = 0.9
)
# }

Run the code above in your browser using DataLab