Skip to contents

This function processes raw data files which have been downloaded by download_data. process_covariates and the underlying source-specific processing functions have been designed to operate on the raw data files. To avoid errors, do not edit the raw data files before passing to process_covariates.

Usage

process_covariates(
  covariate = c("modis_swath", "modis_merge", "koppen-geiger", "blackmarble",
    "koeppen-geiger", "koppen", "koeppen", "geos", "dummies", "gmted", "hms", "smoke",
    "sedac_population", "population", "sedac_groads", "groads", "roads", "nlcd", "tri",
    "narr", "nei", "ecoregions", "ecoregion", "merra", "merra2", "gridmet",
    "terraclimate", "huc", "cropscape", "cdl", "prism"),
  path = NULL,
  ...
)

Arguments

covariate

character(1). Covariate type.

path

character(1). Directory or file path to raw data depending on covariate value.

...

Arguments passed to each raw data processing function.

Value

SpatVector, SpatRaster, sf, or character depending on covariate type and selections.

See also

Author

Insang Song

Examples

## NOTE: Example is wrapped in `\dontrun{}` as function requires a large
##       amount of data which is not included in the package.
if (FALSE) { # \dontrun{
process_covariates(
  covariate = "narr",
  date = c("2018-01-01", "2018-01-10"),
  variable = "weasd",
  path = system.file("extdata", "examples", "narr", "weasd")
)
} # }