Description Usage Arguments Examples
View source: R/spatial_bg_avg.R
Find the spatial block group average, weighting each receptor by its spatial coverage of the block group.
1 2 3 4 5 6 7 8 9 10 11 | spatial_bg_avg(
data = NULL,
result_cols = c("resident_cancer", "resident_hazard", "inhalation_cancer",
"inhalation_hazard", "acute_hazard", "annual_concentration", "acute_concentration"),
receptor_col = "receptor",
pollutant_col = "pollutant",
year = 2017,
bg_geoids = NULL,
signif_digits = 4,
results_only = FALSE
)
|
data |
Data frame containing modeling results for averaging. |
result_cols |
Column names containing the modeling concentration/risk results. |
receptor_col |
Receptor column name with receptor ID numbers. |
pollutant_col |
Pollutant colulmn name for grouping results. |
year |
The MNRISKS results year. Default value is 2017. |
bg_geoids |
Census block group geoid numbers to include in results. Default returns all block groups. |
signif_digits |
Number of significant figures to keep in calculated results. |
results_only |
Return a vector of block group averages. Default is 'FALSE'. |
1 2 3 4 | # For all block groups
bg_avg <- spatial_bg_avg(values = df$resident_cancer,
receptors = df$receptor,
bg_geoids = df$geoid)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.