Skip to contents

Areal rainfall data

Usage

daily_rainfall(
  dates,
  shapefile,
  output_raster = FALSE,
  fun = "mean",
  long = FALSE,
  verbose = TRUE,
  pop_weight = FALSE
)

Arguments

dates

A character vector containing the start and end date in "YYYY-MM-DD" format.

shapefile

A sf object containing the areal aggregation polygons.

output_raster

TRUE/FALSE Should output be cropped rasters? Default is FALSE.

fun

A character string containing the aggregation function, default is "sum".

long

TRUE/FALSE Should the output be in "long" format? Default is FALSE.

verbose

TRUE/FALSE Print progress messages?

pop_weight

TRUE/FALSE Should vaulues be weighted based on WorldPop population estimates? Default is FALSE

Value

A tibble containing extracted values along with any columns from 'shapefile'. If output_raster is TRUE then a SpatRaster object is returned.