Specify processing options for a Cal-Adapt API call

ca_options(
  x = ca_apireq(),
  spatial_ag = c("none", "mean", "max", "median", "min", "sum")[1],
  temporal_ag = NA
)

Arguments

x

Cal-Adapt API request

spatial_ag

Spatial aggregation function for polygon locs.

temporal_ag

List object specifying unit of time and summary function(s) for temporal aggregation. NOT YET SUPPORTED

Details

spatial_ag is the name(s) of summary statistic(s) that will be used when querying polygon locations to aggregate the values of pixel that fall within the area of interest. Values can be mean, max, median, min, and sum. To get retrieve the individual values for all pixels without a summary, use the ca_getrst function.

When querying point locations (e.g., ca_loc_pt or ca_loc_zip, spatial_ag should be set to 'none'.

temporal_ag allows you to apply an additional temporal aggregation function, on top of any temporal aggregation the data are already summarized by (e.g., month or year). When querying climate layers that are already temporally aggregated, the unit of temporal aggregation must be a larger unit of time (e.g., you can't pull down annual average layers and then try to aggregate them by month).