geetools.FeatureCollection.FeatureCollectionAccessor.byProperties#

geetools.FeatureCollection.FeatureCollectionAccessor.byProperties(featureId='system:index', properties=[], labels=[])#

Get a dictionary with all feature values for each properties.

This method is returning a dictionary with all the properties as keys and their values in each feaure as a list.

{
    "property1": {"feature1": value1, "feature2": value2, ...},
    "property2": {"feature1": value1, "feature2": value2, ...},
    ...
}

The output remain server side and can be used to create a client side plot.

Parameters:
  • featureId (geetools.types.ee_str) – The property used to label features. Defaults to “system:index”.

  • properties (geetools.types.ee_list) – A list of properties to get the values from.

  • labels (list) – A list of names to replace properties names. Default to the properties names.

Returns:

A dictionary with all the properties as keys and their values in each feaure as a list.

Return type:

ee.Dictionary

Example

import ee, geetools

fc = ee.FeatureCollection("FAO/GAUL/2015/level2").limit(10)
d = fc.geetools.byProperties(["ADM1_CODE", "ADM2_CODE"])
d.getInfo()