ee.FeatureCollection.aggregate_histogram

Agrega uma determinada propriedade dos objetos em uma coleção, calculando um histograma da propriedade selecionada.

UsoRetorna
FeatureCollection.aggregate_histogram(property)Dicionário
ArgumentoTipoDetalhes
isso: collectionFeatureCollectionA coleção para agregar.
propertyStringA propriedade a ser usada de cada elemento da coleção.

Exemplos

Editor de código (JavaScript)

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

print('Histogram of power plant capacities (MW)',
      fc.aggregate_histogram('capacitymw'));  // Dictionary

Configuração do Python

Consulte a página Ambiente Python para informações sobre a API Python e como usar geemap para desenvolvimento interativo.

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('Histogram of power plant capacities (MW):')
pprint(fc.aggregate_histogram('capacitymw').getInfo())  # Dictionary