ee.FeatureCollection.aggregate_total_var

Agrège une propriété donnée des objets d'une collection, en calculant la variance totale des valeurs de la propriété sélectionnée.

UtilisationRenvoie
FeatureCollection.aggregate_total_var(property)Nombre
ArgumentTypeDétails
ceci : collectionFeatureCollectionCollection à agréger.
propertyChaînePropriété à utiliser pour chaque élément de la collection.

Exemples

Éditeur de code (JavaScript)

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

print('Total variance of power plant capacities (MW)',
      fc.aggregate_total_var('capacitymw'));  // 214307.38335169878

Configuration de Python

Consultez la page Environnement Python pour en savoir plus sur l'API Python et sur l'utilisation de geemap pour le développement interactif.

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 variance of power plant capacities (MW):',
      fc.aggregate_total_var('capacitymw').getInfo())  # 214307.38335169878