load_format_pop_raster: Load and format population raster

Description Usage Arguments Value

View source: R/spatial_data_functions.R

Description

Load a population raster from file, clip it to the given shapefile, and return as a raster brick for the years specified

Usage

1
load_format_pop_raster(pop_fp_format, model_years, country_polys, projection)

Arguments

pop_fp_format

Each of the worldpop rasters are downloaded separately by year. This format specifies the location of each raster, with the 'year' standing in for a particular year. For example: ‘pop_filepath_format = ’/path/to/pop/raster/my_raster_year.tif''

model_years

The years needed for the model. The function will load separate raster layers for each model year based on the filepath template

country_polys

The spatial polygons object (in sf format) that the raster will be clipped to

projection

Projection used for spatial data throughout the model

Value

rasterBrick clipped to the polygons object


njhenry/covidemr documentation built on Feb. 2, 2022, 2:31 a.m.