Learn R Programming

manureshed (version 0.1.2)

batch_analysis_years: Batch Analysis Across Multiple Years

Description

Run manureshed analysis across multiple years with consistent parameters

Usage

batch_analysis_years(
  years,
  scale = "huc8",
  nutrients = c("nitrogen", "phosphorus"),
  include_wwtp = TRUE,
  output_base_dir = tempdir(),
  create_comparative_plots = TRUE,
  verbose = TRUE,
  ...
)

Value

List of results for each year

Arguments

years

Numeric vector. Years to analyze

scale

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

nutrients

Character vector. Nutrients to analyze

include_wwtp

Logical. Whether to include WWTP (only available for 2007-2016 built-in)

output_base_dir

Character. Base output directory

create_comparative_plots

Logical. Whether to create year-over-year comparisons

verbose

Logical. Whether to print progress

...

Additional arguments passed to run_builtin_analysis

Examples

Run this code
# \donttest{
# Analyze trends with WWTP for subset of supported range
batch_results <- batch_analysis_years(
  years = 2010:2012,  # Use smaller range for examples
  scale = "huc8",
  nutrients = "nitrogen",
  include_wwtp = TRUE
)

# Historical analysis without WWTP
historical_results <- batch_analysis_years(
  years = 1990:1992,  # Use smaller range
  scale = "county",
  nutrients = c("nitrogen", "phosphorus"),
  include_wwtp = FALSE
)

# Mixed analysis: some years with WWTP, some without
mixed_results <- batch_analysis_years(
  years = c(2005, 2010, 2015),  # 2010,2015 will have WWTP
  scale = "huc8",
  nutrients = "nitrogen",
  include_wwtp = TRUE  # Will only apply to 2010,2015
)
# }

Run the code above in your browser using DataLab