ee.FeatureCollection.aggregate_total_sd

Tổng hợp trên một thuộc tính nhất định của các đối tượng trong một tập hợp, tính tổng độ lệch chuẩn của các giá trị của thuộc tính đã chọn.

Cách sử dụngGiá trị trả về
FeatureCollection.aggregate_total_sd(property)Số
Đối sốLoạiThông tin chi tiết
this: collectionFeatureCollectionBộ sưu tập cần tổng hợp.
propertyChuỗiThuộc tính cần sử dụng từ mỗi phần tử của bộ sưu tập.

Ví dụ

Trình soạn thảo mã (JavaScript)

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

print('Total std. deviation of power plant capacities (MW)',
      fc.aggregate_total_sd('capacitymw'));  // 462.9334545609107

Thiết lập Python

Hãy xem trang Môi trường Python để biết thông tin về API Python và cách sử dụng geemap cho quá trình phát triển tương tác.

import ee
import geemap.core as geemap

Colab (Python)

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

print('Total std. deviation of power plant capacities (MW):',
      fc.aggregate_total_sd('capacitymw').getInfo())  # 462.9334545609107