plot_impact_weighted: 'plot_impact_weighted'

Description Usage Arguments Value

View source: R/plot_impact_weighted.R

Description

'plot_impact_weighted()' takes output from 'calculate_exposure()' and creates a spatial plot

Usage

1
2
3
4
5
plot_impact_weighted(data.linked, data.units, link.to = "zips",
  zcta.dataset = NULL, counties. = NULL, metric = "hyads",
  time.agg = "year", legend.lims = NULL, legend.name = NULL,
  plot.name = NULL, map.month = NULL, graph.dir = NULL,
  zoom = TRUE, ...)

Arguments

data.linked

data for plotting as output from disperseR::calculate_exposure()

data.units

information on unit locations as output from disperseR::units()

link.to

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

zcta.dataset

ZIP code/ZCTA sptial dataset as imported by disperseR::get_data() or subset thereof. Required only if link.to = 'zips'.

counties.

US counties dataset as imported using USAboundaries::us_counties( ) or subset thereof. Required only if link.to = 'counties'.

metric

plotting metric in ‘data.linked' input. Defaults to ’hyads', the default output of disperseR::calculate_exposure().

time.agg

time aggregation matching original input to disperseR::calculate_exposure(). Can be 'month' or 'year'

legend.lims

legend limits string. Defaults to NULL, which creates a scale from 0 to the 95th percentile of the 'metric'. Should be in the form c(lower,upper).

legend.name

legend name string. Defaults to NULL, which creates a legend title of 'Aggregate HyADS Exposure'.

plot.name

plot title string. Defaults to NULL, or a blank title

map.month

specific month to map in form YYYYMM if time.agg = 'month'. Can be created using disperseR::get_yearmon()

graph.dir

location to save output.

...

modeling parameters passed to ggplot2::theme()

Value

Creates ggplot object of spatial HyADS impacts


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