Aggregate an Earth Engine Image Collection by period
aggregate_ee.Rd
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.
Arguments
- object
object
: a data object produced bycollect_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
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")
}