Day-Of-Year (DOY) Charts(年度(DOY)图表)
原文
The methods that start with ui.Chart.image.doySeries aggregate the time series by day-of-year (DOY). The plots can be created as a DOY average, by year, or by region. The following example uses MODIS NDVI time series to illustrate different modes of DOY charting:
翻译
方法ui.Chart.image.doySeries可以按年度(DOY)汇总时间序列。这些图可以按年份或按地区划分为DOY平均值。以下示例使用MODIS NDVI时间序列来说明DOY图表的不同模式:
代码
// Define a FeatureCollection: three regions of the American West.
var city = ee.Feature( // San Francisco.
ee.Geometry.Rectangle(-122.42, 37.78, -122.4, 37.8), {label: 'City'});
var forest = ee.Feature( // Tahoe National Forest.
ee.Geometry.Rectangle(-121, 39.4, -120.99, 39.45), {label: 'Forest'});
var desert = ee.Feature( // Black Rock Desert.
ee.Geometry.Rectangle(-119.02, 40.95, -119, 41), {label: 'Desert'});
var regions = new ee.FeatureCollection([city, forest, desert]);
// Load several years of MODIS NDVI data.
var collection = ee.ImageCollection('MODIS/MCD43A4_006_NDVI')
.filterDate(ee.Date('2011-01-01'), ee.Date('2014-12-31'));
// Define a chart with one series in the forest region, averaged by DOY.
var series1 = ui.Chart.image.doySeries(
collection, forest, ee.Reducer.mean(), 500);
// Define a chart with a different series for each year in the forest region.
var series2 = ui.Chart.image.doySeriesByYear(
collection, 'NDVI', forest, ee.Reducer.mean(), 500);
// Define a chart with different series for each region, averaged by DOY.
var series3 = ui.Chart.image.doySeriesByRegion(
collection, 'NDVI', regions, ee.Reducer.mean(), 500, ee.Reducer.mean(), 'label');
// Display the three charts.
print(series1, series2, series3);
翻译
结果应如图1所示。图1中的顶部图表代表DOY的平均NDVI时间序列。 中间的图表在输入图像中绘制了每年不同的系列。 底部图表为输入中的每个区域绘制了不同的系列。 观察需要在ui.Chart.image.doySeriesByYear()和ui.Chart.image.doySeriesByRegion()中指定要绘制的波段名称。 使用ui.Chart.image.doySeriesByRegion()时,需要指定区分不同区域的要素(标签)的属性。 在所有情况下,示例使用默认的ee.Reducer.mean()来临时(通过DOY)和空间(按区域)聚合。
结果
- 知识点
aggregate
n. 合计;集合体;总计
adj. 聚合的;集合的;合计的
vt. 集合;聚集;合计
备注:这个没跑动,可能是网络原因。用的原图。