View source: R/spatial_bg_avg.R
spatial_bg_avg | R Documentation |
Find the spatial block group average, weighting each receptor by its spatial coverage of the block group.
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,
counties = NULL,
bg_geoids = NULL,
signif_digits = 3
)
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. |
counties |
5 digit County FIPs codes to return results for, e.g. 27053, 27137. Default returns only the counties included in the data receptor column. "All" will return all MN Counties. |
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. |
## Not run:
# For all block groups
bg_avg <- spatial_bg_avg(values = df$resident_cancer,
receptors = df$receptor,
bg_geoids = df$geoid)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.