eemont.imagecollection.getTimeSeriesByRegions

eemont.imagecollection.getTimeSeriesByRegions(self, reducer, collection, bands=None, scale=None, crs=None, crsTransform=None, tileScale=1, dateColumn='date', dateFormat='ISO', naValue=- 9999)[source]

Gets the time series by regions for the given image collection and feature collection according to the specified reducer (or reducers).

Tip

Check more info about time series in the User Guide.

Parameters
  • self (ee.ImageCollection (this)) – Image collection to get the time series from.

  • reducer (ee.Reducer | list[ee.Reducer]) – Reducer or list of reducers to use for region reduction.

  • collection (ee.FeatureCollection) – Feature Collection to perform the reductions on. Image reductions are applied to each feature in the collection.

  • bands (str | list[str], default = None) – Selection of bands to get the time series from. Defaults to all bands in the image collection.

  • scale (numeric, default = None) – Nomical scale in meters.

  • crs (Projection, default = None) – The projection to work in. If unspecified, the projection of the image’s first band is used. If specified in addition to scale, rescaled to the specified scale.

  • crsTransform (list, default = None) – The list of CRS transform values. This is a row-major ordering of the 3x2 transform matrix. This option is mutually exclusive with ‘scale’, and replaces any transform already set on the projection.

  • tileScale (numeric, default = 1) – A scaling factor used to reduce aggregation tile size; using a larger tileScale (e.g. 2 or 4) may enable computations that run out of memory with the default.

  • dateColumn (str, default = 'date') – Output name of the date column.

  • dateFormat (str, default = 'ISO') – Output format of the date column. Defaults to ISO. Available options: ‘ms’ (for milliseconds), ‘ISO’ (for ISO Standard Format) or a custom format pattern.

  • naValue (numeric, default = -9999) – Value to use as NA when the region reduction doesn’t retrieve a value due to masked pixels.

Returns

Time series by regions retrieved as a Feature Collection.

Return type

ee.FeatureCollection

See also

getTimeSeriesByRegion

Gets the time series by region for the given image collection and geometry (feature or feature collection are also supported) according to the specified reducer (or reducers).

Examples

>>> import ee, eemont
>>> ee.Initialize()
>>> f1 = ee.Feature(ee.Geometry.Point([3.984770,48.767221]).buffer(50),{'ID':'A'})
>>> f2 = ee.Feature(ee.Geometry.Point([4.101367,48.748076]).buffer(50),{'ID':'B'})
>>> fc = ee.FeatureCollection([f1,f2])
>>> S2 = (ee.ImageCollection('COPERNICUS/S2_SR')
...      .filterBounds(fc)
...      .filterDate('2020-01-01','2021-01-01')
...      .maskClouds()
...      .scaleAndOffset()
...      .spectralIndices(['EVI','NDVI']))
>>> ts = S2.getTimeSeriesByRegions(reducer = [ee.Reducer.mean(),ee.Reducer.median()],
...                                collection = fc,
...                                bands = ['EVI','NDVI'],
...                                scale = 10)