- Eixo X = imagem rotulada por xProperty (padrão: "system:time_start").
- Eixo Y = saída do redutor.
- Série = região rotulada por seriesProperty (padrão: "system:index").
Retorna um gráfico.
Uso | Retorna |
---|---|
ui.Chart.image.seriesByRegion(imageCollection, regions, reducer, band, scale, xProperty, seriesProperty) | ui.Chart |
Argumento | Tipo | Detalhes |
---|---|---|
imageCollection | ImageCollection | Uma ImageCollection com dados a serem incluídos no gráfico. |
regions | Feature|FeatureCollection|Geometry|List<Feature>|List<Geometry> | As regiões a serem reduzidas. |
reducer | Redutor | Redutor que gera o valor para o eixo y. Precisa retornar um único valor. |
band | Número|String, opcional | O nome da banda a ser reduzida usando o redutor. O padrão é a primeira banda. |
scale | Número, opcional | Escala a ser usada com o redutor em metros. |
xProperty | String, opcional | Propriedade a ser usada como o rótulo de cada imagem no eixo x. O padrão é "system:time_start". |
seriesProperty | String, opcional | Propriedade dos recursos em "opt_regions" a ser usada para rótulos de série. O padrão é "system:index". |
Exemplos
Editor de código (JavaScript)
// Define regions of pixels to reduce and chart a time series for. var regions = ee.FeatureCollection([ ee.Feature( ee.Geometry.BBox(-121.916, 37.130, -121.844, 37.076), {label: 'Forest'}), ee.Feature( ee.Geometry.BBox(-122.438, 37.765, -122.396, 37.800), {label: 'Urban'}) ]); // Define an image collection time series to chart, MODIS vegetation indices // in this case. var imgCol = ee.ImageCollection('MODIS/006/MOD13A1') .filter(ee.Filter.date('2015-01-01', '2020-01-01')) .select(['NDVI', 'EVI']); // Define the chart and print it to the console. var chart = ui.Chart.image.seriesByRegion({ imageCollection: imgCol, band: 'NDVI', regions: regions, reducer: ee.Reducer.mean(), scale: 500, seriesProperty: 'label', xProperty: 'system:time_start' }) .setOptions({ title: 'Average NDVI Value by Date', hAxis: {title: 'Date', titleTextStyle: {italic: false, bold: true}}, vAxis: { title: 'NDVI (x1e4)', titleTextStyle: {italic: false, bold: true} }, lineWidth: 5, colors: ['0f8755', '808080'], }); print(chart);