ee.FeatureCollection.aggregate_stats

यह फ़ंक्शन, किसी कलेक्शन में मौजूद ऑब्जेक्ट की दी गई प्रॉपर्टी के आधार पर एग्रीगेट करता है. साथ ही, चुनी गई प्रॉपर्टी के लिए, जोड़, कम से कम, ज़्यादा से ज़्यादा, औसत, सैंपल स्टैंडर्ड डेविएशन, सैंपल वैरियंस, कुल स्टैंडर्ड डेविएशन, और कुल वैरियंस कैलकुलेट करता है.

इस्तेमालरिटर्न
FeatureCollection.aggregate_stats(property)शब्दकोश
आर्ग्यूमेंटटाइपविवरण
यह: collectionFeatureCollectionवह कलेक्शन जिसके आधार पर एग्रीगेट करना है.
propertyस्ट्रिंगकलेक्शन के हर एलिमेंट से इस्तेमाल की जाने वाली प्रॉपर्टी.

उदाहरण

कोड एडिटर (JavaScript)

// FeatureCollection of power plants in Belgium.
var fc = ee.FeatureCollection('WRI/GPPD/power_plants')
             .filter('country_lg == "Belgium"');

print('Power plant capacities (MW) summary stats',
      fc.aggregate_stats('capacitymw'));

/**
 * Expected ee.Dictionary output
 *
 * {
 *   "max": 2910,
 *   "mean": 201.34242424242427,
 *   "min": 1.8,
 *   "sample_sd": 466.4808892319684,
 *   "sample_var": 217604.42001864797,
 *   "sum": 13288.600000000002,
 *   "sum_sq": 16819846.24,
 *   "total_count": 66,
 *   "total_sd": 462.9334545609107,
 *   "total_var": 214307.38335169878,
 *   "valid_count": 66,
 *   "weight_sum": 66,
 *   "weighted_sum": 13288.600000000002
 * }
 */

Python सेटअप करना

Python API और इंटरैक्टिव डेवलपमेंट के लिए geemap का इस्तेमाल करने के बारे में जानकारी पाने के लिए, Python एनवायरमेंट पेज देखें.

import ee
import geemap.core as geemap

Colab (Python)

from pprint import pprint

# FeatureCollection of power plants in Belgium.
fc = ee.FeatureCollection('WRI/GPPD/power_plants').filter(
    'country_lg == "Belgium"')

print('Power plant capacities (MW) summary stats:')
pprint(fc.aggregate_stats('capacitymw').getInfo())

# Expected ee.Dictionary output

#  {
#   "max": 2910,
#    "mean": 201.34242424242427,
#    "min": 1.8,
#    "sample_sd": 466.4808892319684,
#    "sample_var": 217604.42001864797,
#    "sum": 13288.600000000002,
#    "sum_sq": 16819846.24,
#    "total_count": 66,
#    "total_sd": 462.9334545609107,
#    "total_var": 214307.38335169878,
#    "valid_count": 66,
#    "weight_sum": 66,
#    "weighted_sum": 13288.600000000002
#  }