ui.Chart.image.seriesByRegion

יוצר תרשים מאוסף תמונות. הפונקציה מחלצת את הערך של הפס שצוין בכל אזור עבור כל תמונה בקולקציה, ומשרטטת אותו. בדרך כלל סדרת זמן.

  ‫- ציר X = תמונה עם תווית לפי xProperty (ברירת מחדל: 'system:time_start').

  – ציר ה-Y = פלט של סף הפרשי הגובה.

  ‫- Series = אזור שמתויג על ידי seriesProperty (ברירת מחדל: 'system:index').

מחזירה תרשים.

שימושהחזרות
ui.Chart.image.seriesByRegion(imageCollection, regions, reducer, band, scale, xProperty, seriesProperty)ui.Chart
ארגומנטסוגפרטים
imageCollectionImageCollection‫ImageCollection עם נתונים שייכללו בתרשים.
regionsFeature|FeatureCollection|Geometry|List<Feature>|List<Geometry>האזורים לצמצום.
reducerמצמצםפונקציית Reducer שיוצרת את הערך של ציר ה-y. הפונקציה צריכה להחזיר ערך יחיד.
bandמספר|מחרוזת, אופציונלישם הלהקה שרוצים לצמצם באמצעות הפונקציה לצמצום. ברירת המחדל היא הלהקה הראשונה.
scaleמספר, אופציונליהקנה מידה לשימוש עם הפונקציה לצמצום הנתונים במטרים.
xPropertyמחרוזת, אופציונליהמאפיין שישמש כתווית לכל תמונה בציר ה-X. ברירת המחדל היא 'system:time_start'.
seriesPropertyמחרוזת, אופציונלימאפיין של תכונות ב-opt_regions שישמש לתוויות של סדרות. ברירת המחדל היא 'system:index'.

דוגמאות

עורך הקוד (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);