ui.Chart.image.seriesByRegion

이미지 컬렉션에서 차트를 생성합니다. 컬렉션의 각 이미지에 대해 각 지역에서 지정된 밴드의 값을 추출하여 표시합니다. 일반적으로 시계열입니다.

  - X축 = xProperty로 라벨이 지정된 이미지 (기본값: 'system:time_start')

  - Y축 = 리듀서 출력

  - 계열 = 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감소기y축 값을 생성하는 리듀서입니다. 단일 값을 반환해야 합니다.
bandNumber|String, 선택사항리듀서를 사용하여 줄일 밴드 이름입니다. 기본값은 첫 번째 밴드입니다.
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);