ImageCollection चार्ट

ui.Chart.image मॉड्यूल में, ImageCollection में इमेज के स्पेसटाइम में कमी के नतीजों से चार्ट रेंडर करने के लिए, फ़ंक्शन का एक सेट शामिल है. फ़ंक्शन चुनने से, चार्ट में डेटा का क्रम तय होता है. इसका मतलब है कि x- और y-ऐक्सिस की वैल्यू और सीरीज़ को क्या तय करता है. अपने काम के लिए सबसे सही फ़ंक्शन चुनने के लिए, यहां दिए गए फ़ंक्शन के ब्यौरे और उदाहरणों का इस्तेमाल करें.

चार्ट फ़ंक्शन

विज़ुअल गाइड के तौर पर, नीचे दिए गए प्लॉट डायग्राम का इस्तेमाल करके जानें कि हर फ़ंक्शन, चार्ट में स्पेसटाइम इमेज कलेक्शन में कमी के नतीजों को कैसे व्यवस्थित करता है. इसका मतलब है कि कौनसे एलिमेंट, x वैल्यू, y वैल्यू, और सीरीज़ तय करते हैं. ध्यान दें कि ui.Chart.image.doySeries* फ़ंक्शन में दो रीड्यूसर इस्तेमाल किए जाते हैं: पहला, क्षेत्र के हिसाब से डेटा कम करने के लिए (regionReducer) और दूसरा, साल के एक ही दिन में होने वाली बिक्री को कम करने के लिए (yearReducer). नीचे दिए गए सेक्शन में दिए गए उदाहरणों में, इन दोनों पैरामीटर के लिए आर्ग्युमेंट के तौर पर ee.Reducer.mean() का इस्तेमाल किया गया है.

ui.Chart.image.series

इमेज की तारीख को system:time_start प्रॉपर्टी के हिसाब से, x-ऐक्सिस पर प्लॉट किया जाता है. सीरीज़ को इमेज बैंड के हिसाब से तय किया जाता है. Y-ऐक्सिस की वैल्यू, किसी एक क्षेत्र के लिए तारीख के हिसाब से इमेज की संख्या में हुई कमी है.

ui.Chart.image.seriesByRegion

इमेज की तारीख को system:time_start प्रॉपर्टी के हिसाब से, x-ऐक्सिस पर प्लॉट किया जाता है. सीरीज़ को इलाकों के हिसाब से बांटा जाता है. Y-ऐक्सिस की वैल्यू, किसी एक इमेज बैंड के लिए, तारीख के हिसाब से इमेज की संख्या में हुई कमी है.

ui.Chart.image.doySeries

इमेज के साल के दिन को system:time_start प्रॉपर्टी के हिसाब से, x-ऐक्सिस पर प्लॉट किया जाता है. सीरीज़ को इमेज बैंड के हिसाब से तय किया जाता है. Y-ऐक्सिस की वैल्यू, किसी दिए गए इलाके में इमेज के पिक्सल की कमी होती है. इन्हें साल के दिन के हिसाब से ग्रुप किया जाता है.

ui.Chart.image.doySeriesByYear

इमेज के साल के दिन को system:time_start प्रॉपर्टी के हिसाब से, x-ऐक्सिस पर प्लॉट किया जाता है. सीरीज़ को ImageCollection में मौजूद सालों के हिसाब से तय किया जाता है. Y-ऐक्सिस की वैल्यू, किसी चुने गए इमेज बैंड के लिए, किसी दिए गए इलाके में इमेज पिक्सल की कमी होती है. इन्हें साल के दिन के हिसाब से ग्रुप किया जाता है.

ui.Chart.image.doySeriesByRegion

इमेज के साल के दिन को system:time_start प्रॉपर्टी के हिसाब से, x-ऐक्सिस पर प्लॉट किया जाता है. सीरीज़ को इलाकों के हिसाब से बांटा जाता है. Y-ऐक्सिस की वैल्यू, किसी दिए गए इलाके में इमेज के पिक्सल की कमी होती है. इन्हें चुने गए इमेज बैंड के लिए, साल के दिन के हिसाब से ग्रुप किया जाता है.

डेटा का उदाहरण

यहां दिए गए उदाहरण, ImageCollection पर आधारित हैं. यह MODIS पर आधारित एनडीवीआई और ईवीआई की टाइम सीरीज़ है. क्षेत्र को छोटा करने की प्रोसेस, FeatureCollection में मौजूद सुविधाओं के हिसाब से तय की गई इको-क्षेत्रों पर की जाती है. इसे डेमो के मकसद से डिज़ाइन किया गया है (जानें कि इसे कैसे बनाया गया).

ui.Chart.image.series

किसी क्षेत्र के लिए इमेज टाइम सीरीज़ दिखाने के लिए, ui.Chart.image.series का इस्तेमाल करें; हर इमेज बैंड को एक यूनीक सीरीज़ के तौर पर दिखाया जाता है. यह अलग-अलग इमेज बैंड की टाइम सीरीज़ की तुलना करने के लिए काम का है. यहां, NDVI और EVI जैसे वनस्पति सूचकांक दिखाने वाले बैंड के साथ MODIS इमेज कलेक्शन को प्लॉट किया गया है. हर इमेज के ऑब्ज़र्वेशन की तारीख को x-ऐक्सिस के साथ शामिल किया जाता है. वहीं, वन के इको-क्षेत्र को इंटरसेक्शन करने वाले पिक्सल की औसत कमी से y-ऐक्सिस तय होता है.

कोड एडिटर (JavaScript)

// Import the example feature collection and subset the forest feature.
var forest = ee.FeatureCollection('projects/google/charts_feature_example')
                 .filter(ee.Filter.eq('label', 'Forest'));

// Load MODIS vegetation indices data and subset a decade of images.
var vegIndices = ee.ImageCollection('MODIS/061/MOD13A1')
                     .filter(ee.Filter.date('2010-01-01', '2020-01-01'))
                     .select(['NDVI', 'EVI']);

// Define the chart and print it to the console.
var chart =
    ui.Chart.image
        .series({
          imageCollection: vegIndices,
          region: forest,
          reducer: ee.Reducer.mean(),
          scale: 500,
          xProperty: 'system:time_start'
        })
        .setSeriesNames(['EVI', 'NDVI'])
        .setOptions({
          title: 'Average Vegetation Index Value by Date for Forest',
          hAxis: {title: 'Date', titleTextStyle: {italic: false, bold: true}},
          vAxis: {
            title: 'Vegetation index (x1e4)',
            titleTextStyle: {italic: false, bold: true}
          },
          lineWidth: 5,
          colors: ['e37d05', '1d6b99'],
          curveType: 'function'
        });
print(chart);

ui.Chart.image.seriesByRegion

एक से ज़्यादा इलाकों के लिए, इमेज बैंड की एक टाइम सीरीज़ दिखाने के लिए ui.Chart.image.seriesByRegion का इस्तेमाल करें. हर इलाके को एक यूनीक सीरीज़ के तौर पर दिखाया जाता है. यह कई इलाकों में किसी एक बैंड की टाइम सीरीज़ की तुलना करने के लिए मददगार है. यहां, तीन इको-क्षेत्रों के लिए एनडीवीआई टाइम सीरीज़ को दिखाने वाले MODIS इमेज कलेक्शन को प्लॉट किया गया है. हर इमेज के ऑब्ज़र्वेशन की तारीख को एक्स-ऐक्सिस पर शामिल किया जाता है. वहीं, जंगल, रेगिस्तान, और घास के मैदान वाले इको-क्षेत्रों को इंटरसेक्शन करने वाले पिक्सल की औसत कमी, Y-ऐक्सिस सीरीज़ तय करती है.

कोड एडिटर (JavaScript)

// Import the example feature collection.
var ecoregions = ee.FeatureCollection('projects/google/charts_feature_example');

// Load MODIS vegetation indices data and subset a decade of images.
var vegIndices = ee.ImageCollection('MODIS/061/MOD13A1')
                     .filter(ee.Filter.date('2010-01-01', '2020-01-01'))
                     .select(['NDVI', 'EVI']);

// Define the chart and print it to the console.
var chart =
    ui.Chart.image
        .seriesByRegion({
          imageCollection: vegIndices,
          band: 'NDVI',
          regions: ecoregions,
          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: ['f0af07', '0f8755', '76b349'],
        });
print(chart);

ui.Chart.image.doySeries

किसी दिए गए इलाके के लिए, साल के दिन की टाइम सीरीज़ दिखाने के लिए ui.Chart.image.doySeries का इस्तेमाल करें. हर इमेज बैंड को एक यूनीक सीरीज़ के तौर पर दिखाया जाता है. यह कई सालों में, साल के एक ही दिन होने वाले अवलोकनों को कम करने के लिए मददगार होता है. उदाहरण के लिए, इस उदाहरण में MODIS से औसत सालाना एनडीवीआई और ईवीआई प्रोफ़ाइलों की तुलना की गई है.

कोड एडिटर (JavaScript)

// Import the example feature collection and subset the grassland feature.
var grassland = ee.FeatureCollection('projects/google/charts_feature_example')
                    .filter(ee.Filter.eq('label', 'Grassland'));

// Load MODIS vegetation indices data and subset a decade of images.
var vegIndices = ee.ImageCollection('MODIS/061/MOD13A1')
                     .filter(ee.Filter.date('2010-01-01', '2020-01-01'))
                     .select(['NDVI', 'EVI']);

// Define the chart and print it to the console.
var chart =
    ui.Chart.image
        .doySeries({
          imageCollection: vegIndices,
          region: grassland,
          regionReducer: ee.Reducer.mean(),
          scale: 500,
          yearReducer: ee.Reducer.mean(),
          startDay: 1,
          endDay: 365
        })
        .setSeriesNames(['EVI', 'NDVI'])
        .setOptions({
          title: 'Average Vegetation Index Value by Day of Year for Grassland',
          hAxis: {
            title: 'Day of year',
            titleTextStyle: {italic: false, bold: true}
          },
          vAxis: {
            title: 'Vegetation index (x1e4)',
            titleTextStyle: {italic: false, bold: true}
          },
          lineWidth: 5,
          colors: ['e37d05', '1d6b99'],
        });
print(chart);

ui.Chart.image.doySeriesByYear

किसी दिए गए इलाके और इमेज बैंड के लिए, साल के दिन की टाइम सीरीज़ दिखाने के लिए ui.Chart.image.doySeriesByYear का इस्तेमाल करें. इसमें इमेज कलेक्शन में मौजूद हर साल को एक यूनीक सीरीज़ के तौर पर दिखाया जाता है. यह साल के हिसाब से, सालाना टाइम सीरीज़ की तुलना करने के लिए काम का है. उदाहरण के लिए, इस उदाहरण में, साल 2012 और 2019 के लिए, घास के मैदान वाले इको-क्षेत्र के लिए, MODIS से मिली एनडीवीआई प्रोफ़ाइलों को प्लॉट किया गया है. इससे, साल-दर-साल के हिसाब से आसानी से जानकारी मिलती है.

कोड एडिटर (JavaScript)

// Import the example feature collection and subset the grassland feature.
var grassland = ee.FeatureCollection('projects/google/charts_feature_example')
                    .filter(ee.Filter.eq('label', 'Grassland'));

// Load MODIS vegetation indices data and subset years 2012 and 2019.
var vegIndices = ee.ImageCollection('MODIS/061/MOD13A1')
                     .filter(ee.Filter.or(
                         ee.Filter.date('2012-01-01', '2013-01-01'),
                         ee.Filter.date('2019-01-01', '2020-01-01')))
                     .select(['NDVI', 'EVI']);

// Define the chart and print it to the console.
var chart = ui.Chart.image
                .doySeriesByYear({
                  imageCollection: vegIndices,
                  bandName: 'NDVI',
                  region: grassland,
                  regionReducer: ee.Reducer.mean(),
                  scale: 500,
                  sameDayReducer: ee.Reducer.mean(),
                  startDay: 1,
                  endDay: 365
                })
                .setOptions({
                  title: 'Average NDVI Value by Day of Year for Grassland',
                  hAxis: {
                    title: 'Day of year',
                    titleTextStyle: {italic: false, bold: true}
                  },
                  vAxis: {
                    title: 'NDVI (x1e4)',
                    titleTextStyle: {italic: false, bold: true}
                  },
                  lineWidth: 5,
                  colors: ['39a8a7', '9c4f97'],
                });
print(chart);

ui.Chart.image.doySeriesByRegion

एक इमेज बैंड के तौर पर, साल के दिन की टाइम सीरीज़ को कई इलाकों के लिए दिखाने के लिए, ui.Chart.image.doySeriesByRegion का इस्तेमाल करें. इसमें हर इलाके को एक यूनीक सीरीज़ के तौर पर दिखाया जाता है. यह क्षेत्रों के बीच, सालाना सिंगल-बैंड टाइम सीरीज़ की तुलना करने के लिए मददगार है. उदाहरण के लिए, इस उदाहरण में, वन, रेगिस्तान, और घास के मैदान वाले इको-क्षेत्रों के लिए, MODIS से मिली सालाना एनडीवीआई प्रोफ़ाइलें प्लॉट की गई हैं. इससे क्षेत्र के हिसाब से एनडीवीआई के जवाब की आसानी से तुलना की जा सकती है. ध्यान दें कि साल के एक ही दिन होने वाले ऑब्ज़र्वेशन को उनके औसत से कम कर दिया जाता है.

कोड एडिटर (JavaScript)

// Import the example feature collection.
var ecoregions = ee.FeatureCollection('projects/google/charts_feature_example');

// Load MODIS vegetation indices data and subset a decade of images.
var vegIndices = ee.ImageCollection('MODIS/061/MOD13A1')
                     .filter(ee.Filter.date('2010-01-01', '2020-01-01'))
                     .select(['NDVI', 'EVI']);

// Define the chart and print it to the console.
var chart = ui.Chart.image
                .doySeriesByRegion({
                  imageCollection: vegIndices,
                  bandName: 'NDVI',
                  regions: ecoregions,
                  regionReducer: ee.Reducer.mean(),
                  scale: 500,
                  yearReducer: ee.Reducer.mean(),
                  seriesProperty: 'label',
                  startDay: 1,
                  endDay: 365
                })
                .setOptions({
                  title: 'Average NDVI Value by Day of Year',
                  hAxis: {
                    title: 'Day of year',
                    titleTextStyle: {italic: false, bold: true}
                  },
                  vAxis: {
                    title: 'NDVI (x1e4)',
                    titleTextStyle: {italic: false, bold: true}
                  },
                  lineWidth: 5,
                  colors: ['f0af07', '0f8755', '76b349'],
                });
print(chart);