calculate_exposure: create a set of directories to run disperseR

Description Usage Arguments Details Value

View source: R/calculate_exposure.R

Description

'calculate_exposure()' takes linked HYSPLIT outputs combined using 'disperseR::combine_monthly_links()' and sums them by emissions. The results can be aggregated to three different source levels and two different time scales. Various combinations of 'year.E' and 'year.D' can be applied to develop counterfactual scenarios.

Usage

1
2
3
4
calculate_exposure(year.E, year.D, link.to = "zips",
  pollutant = "SO2..tons.", units.mo, rda_file = "loaded",
  exp_dir = NULL, source.agg = c("total", "facility", "unit"),
  time.agg = c("year", "month"), return.monthly.data = F)

Arguments

year.E

emissions year

year.D

HYSPLIT year

link.to

spatial scale for plotting. One of 'zips', 'counties', or 'grids' that should match original input to disperseR::link_all_units()

pollutant

name of column in 'units.mo' for weighting

rda_file

specification of data location produced by ‘disperseR::combine_monthly_links()'. Can denote ’loaded' if the object is loaded in the .GlobalEnv() or a file location

source.agg

source aggregation level

time.agg

time aggregation level

return.monthly.data

logical. If TRUE, returns monthly datasets if ‘time.agg = ’month''. Set to FALSE to save memory space.

exo_dir

file path to save resulting exposure dataset

Details

calculate_exposure

Value

Creates directories (does not overwrite if existing). Outputs string variables with paths to the environment.


lhenneman/disperseR documentation built on Nov. 14, 2021, 6:24 p.m.