Skip to contents

This function prepares tabular population exposure data compatible with the attribute() and compare() functions, based on gridded pollution concentration data and polygon data representing geographic units. If population data is provided, the function calculates an average concentration value in each geographic unit that is weighted with the population number at each location. If no population data is provided, the function calculates the simple spatial average concentration in each geographic unit.

Usage

prepare_exposure(
  poll_grid,
  geo_units,
  population = NULL,
  pop_grid = NULL,
  geo_id_micro = NULL,
  geo_id_macro = NULL,
  bin_width = 0.1
)

Arguments

poll_grid

SpatRaster of the pollution concentration data.

geo_units

sf of the geographic units or sub-units.

population

Integer vector of the total population number in each geographic sub-unit.

pop_grid

SpatRaster of the gridded population data.

geo_id_micro

Numeric or string vector of the IDs of the geographic units. Required if pop_grid is given or if no population data is provided.

geo_id_macro

Numeric or string vector of the higher-level IDs of the geographic units the sub-unit belong to and will be aggregated at. Required if population is provided.

bin_width

Numeric specifying the width of the population exposure bins.

Value

This function returns a list containing:

1) main (list) containing the main results as vectors;

  • geo_id_micro of geo_id_macro (string column) containing the (higher-level) geographic IDs of the assessment

  • exposure_mean (numeric column) containing the (population-weighted) mean exposure

  • population_total (integer column) containing the total population in each geographic unit, if population data was provided

2) detailed (list) containing detailed (and interim) results.

Author

Arno Pauwels & Liliana Vazquez Fernandez

Examples

# Goal: determine population-weighted mean PM2.5 exposure for several
# neighborhoods of Brussels (Belgium)

path <- system.file("extdata", "exdat_pwm_1.tif", package = "healthiar")
exdat_pwm_1 <- terra::rast(path)

pwm <- prepare_exposure(
  poll_grid = exdat_pwm_1, # Formal class SpatRaster
  geo_units = exdat_pwm_2, # sf of the geographic sub-units
  population = sf::st_drop_geometry(exdat_pwm_2$population), # population per geographic sub-unit
  geo_id_macro = sf::st_drop_geometry(exdat_pwm_2$region) # higher-level IDs to aggregate at
)

pwm$exposure_main # population-weighted mean exposures for the (higher-level) geographic units
#> $geo_id_macro
#> [1] "Center" "East"   "North"  "South"  "West"  
#> 
#> $exposure_mean
#> [1] 11.47271 11.10716 11.48670 11.09940 11.38849
#> 
#> $population_total
#> [1] 203105 187907 257573 308860 298802
#>