Duyuru:
15 Nisan 2025'ten önce Earth Engine'i kullanmak için kaydedilen tüm ticari olmayan projelerin Earth Engine erişimini sürdürmek için
ticari olmayan uygunluğu doğrulaması gerekir.
ui.Chart.image.seriesByRegion
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Resim koleksiyonundan grafik oluşturur. Koleksiyondaki her resim için her bölgedeki belirtilen bandın değerini çıkarır ve grafiğini oluşturur. Genellikle bir zaman serisidir.
- X ekseni = xProperty ile etiketlenen resim (varsayılan: "system:time_start").
- Y ekseni = Redüktör çıkışı.
- Seri = seriesProperty ile etiketlenen bölge (varsayılan: "system:index").
Grafik döndürür.
Kullanım | İadeler |
---|
ui.Chart.image.seriesByRegion(imageCollection, regions, reducer, band, scale, xProperty, seriesProperty) | ui.Chart |
Bağımsız Değişken | Tür | Ayrıntılar |
---|
imageCollection | ImageCollection | Grafiğe dahil edilecek verileri içeren bir ImageCollection. |
regions | Feature|FeatureCollection|Geometry|List<Feature>|List<Geometry> | İndirgenecek bölgeler. |
reducer | Azaltıcı | Y ekseninin değerini oluşturan küçültücü. Tek bir değer döndürmelidir. |
band | Number|String, isteğe bağlı | Küçültücü kullanılarak azaltılacak bant adı. Varsayılan olarak ilk bant kullanılır. |
scale | Numara, isteğe bağlı | Metre cinsinden küçültücüyle kullanılacak ölçek. |
xProperty | Dize, isteğe bağlı | X eksenindeki her resim için etiket olarak kullanılacak özellik. Varsayılan olarak "system:time_start" değerine ayarlanır. |
seriesProperty | Dize, isteğe bağlı | Dizi etiketleri için kullanılacak, opt_regions içindeki özelliklerin özelliği. Varsayılan olarak "system:index" kullanılır. |
Örnekler
Kod Düzenleyici (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);
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-07-25 UTC.
[null,null,["Son güncelleme tarihi: 2025-07-25 UTC."],[[["\u003cp\u003eGenerates a chart that visualizes the change in a specific band's value over time within defined regions of an image collection.\u003c/p\u003e\n"],["\u003cp\u003eCharts the reducer output on the y-axis, time (or a specified property) on the x-axis, and uses regions as separate series.\u003c/p\u003e\n"],["\u003cp\u003eOffers customization options for the chart's appearance, such as titles, axes labels, line properties, and series colors, enabling detailed visual representation of the data.\u003c/p\u003e\n"],["\u003cp\u003eUses a reducer to summarize pixel values within each region for every image in the collection, allowing for analysis of trends and patterns.\u003c/p\u003e\n"],["\u003cp\u003eAccepts an image collection, regions of interest, a reducer, and optional parameters for band selection, scale, and property labeling for flexible data analysis and visualization.\u003c/p\u003e\n"]]],["This code generates a chart from an image collection, extracting and plotting band values per region. It uses `ui.Chart.image.seriesByRegion` with parameters: `imageCollection`, `regions`, `reducer`, `band`, `scale`, `xProperty`, and `seriesProperty`. The x-axis represents images labeled by `xProperty`, the y-axis shows the reducer's output, and series are labeled by `seriesProperty`. It takes data from an `imageCollection`, reduces it based on regions, and displays the results in a chart, frequently displaying a time series. An example provided uses MODIS vegetation indices.\n"],null,["# ui.Chart.image.seriesByRegion\n\n\u003cbr /\u003e\n\nGenerates a Chart from an image collection. Extracts and plots the value of the specified band in each region for each image in the collection. Usually a time series.\n\n\u003cbr /\u003e\n\n- X-axis = Image labeled by xProperty (default: 'system:time_start').\n\n- Y-axis = Reducer output.\n\n- Series = Region labeled by seriesProperty (default: 'system:index').\n\nReturns a chart.\n\n| Usage | Returns |\n|-------------------------------------------------------------------------------------------------------------------------------|----------|\n| `ui.Chart.image.seriesByRegion(imageCollection, regions, reducer, `*band* `, `*scale* `, `*xProperty* `, `*seriesProperty*`)` | ui.Chart |\n\n| Argument | Type | Details |\n|-------------------|-------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------|\n| `imageCollection` | ImageCollection | An ImageCollection with data to be included in the chart. |\n| `regions` | Feature\\|FeatureCollection\\|Geometry\\|List\\\u003cFeature\\\u003e\\|List\\\u003cGeometry\\\u003e | The regions to reduce. |\n| `reducer` | Reducer | Reducer that generates the value for the y-axis. Must return a single value. |\n| `band` | Number\\|String, optional | The band name to reduce using the reducer. Defaults to the first band. |\n| `scale` | Number, optional | Scale to use with the reducer in meters. |\n| `xProperty` | String, optional | Property to be used as the label for each image on the x-axis. Defaults to 'system:time_start'. |\n| `seriesProperty` | String, optional | Property of features in opt_regions to be used for series labels. Defaults to 'system:index'. |\n\nExamples\n--------\n\n### Code Editor (JavaScript)\n\n```javascript\n// Define regions of pixels to reduce and chart a time series for.\nvar regions = ee.FeatureCollection([\n ee.Feature(\n ee.Geometry.BBox(-121.916, 37.130, -121.844, 37.076), {label: 'Forest'}),\n ee.Feature(\n ee.Geometry.BBox(-122.438, 37.765, -122.396, 37.800), {label: 'Urban'})\n]);\n\n// Define an image collection time series to chart, MODIS vegetation indices\n// in this case.\nvar imgCol = ee.ImageCollection('MODIS/006/MOD13A1')\n .filter(ee.Filter.date('2015-01-01', '2020-01-01'))\n .select(['NDVI', 'EVI']);\n\n// Define the chart and print it to the console.\nvar chart = ui.Chart.image.seriesByRegion({\n imageCollection: imgCol,\n band: 'NDVI',\n regions: regions,\n reducer: ee.Reducer.mean(),\n scale: 500,\n seriesProperty: 'label',\n xProperty: 'system:time_start'\n})\n.setOptions({\n title: 'Average NDVI Value by Date',\n hAxis: {title: 'Date', titleTextStyle: {italic: false, bold: true}},\n vAxis: {\n title: 'NDVI (x1e4)',\n titleTextStyle: {italic: false, bold: true}\n },\n lineWidth: 5,\n colors: ['0f8755', '808080'],\n});\nprint(chart);\n```"]]