Skip to contents

Performs simple temporal aggregation of Earth Engine Image collections by month or year. For example, it can calculate the maximum normalized difference vegetation index (NDVI) of an area of interest for each year. Note that processing times can increase substantially with an increased number of images.

Usage

aggregate_ee(object, frequency = "month", reduce_by = NULL)

Arguments

object

object: a data object produced by collect_ee()

frequency

str, optional: either "month" or "year" are accepted

reduce_by

str, optional: summary statistic or technique to perform on aggregated data. If NULL (default), will calculate the mean per period

Value

an updated collect_ee() object that can be passed on to map_ee()

or download_ee()

Examples

if (FALSE) {
img <- collect_ee(
  collection = "LANDSAT/LC09/C02/T1_L2",
  coords = c(149.769345, -30.335861, 149.949173, -30.206271),
  date = "2021-06-01",
  end_date = "2022-06-01"
)

preprocess_ee(img, spectral = "NDVI")
aggregate_ee(img, reduce_by = "median")
}