7 Case Study - Alternate PM2.5 surfaces

The PM2.5 exposure surfaces used in the provided pipeline comes from Surface PM2.5 V4.GL.02 dataset developed by van Donkelaar, A. et al. (2016). Alternative models of PM2.5 differing in method, temporal or spatial coverage and/or resolution which are more suited to your particular study may be used as the input exposure rasters.

To use different PM2.5 surfaces, replace the call to function import_globalgwr_pm25_2010_2015 in _targets.R with targets importing and tidying the new raster data.

A satellite-derived land use regression (SatLUR) modelled PM2.5 surface produced by Luke Knibbs is available on request.


Input files for van Donkelaar’s PM2.5 rasters are specified in target input_globalgwr_pm25_2010_2015. These files are subsequently cleaned in target tidy_env_exposure_pm25 with a custom function do_tidy_env_exposure_pm25. The input raster files are read and stacked into a multilayer raster, with names and time attribute of the layers assigned with the appropriate year.

To replace these input data with a set of different source rasters, substitute the input_globalgwr_pm25_2010_2015 with a target pointing to the new input exposure raster files. Read and tidy the data in a function replacing do_tidy_env_exposure_pm25, producing a SpatRaster with time attribute attached. Your code should look similar to the following.

inputs <- list(
  ...,

  # exposure rasters
  tar_files_input(
    infile_pm25,
    file.path(
      "YOUR_DATA_DIR",
      sprintf("SatPM25_2000_2015/data_derived_rasters/satlur_pm25_ug_m3_%s.tif",
              years)
      )
    ),
  ...
)

Change the processing steps in do_tidy_env_exposure_pm25 as needed to tidy the raster input.