byProperties#
- geetools.ee_feature_collection.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:
- Returns:
A dictionary with all the properties as keys and their values in each feaure as a list.
- Return type:
See also
ee.FeatureCollection.geetools.byFeatures: Get a dictionary with all property values for each feature.ee.FeatureCollection.geetools.plot_by_properties: Plot the values of a FeatureCollection by property.
Example
import ee, geetools from geetools.utils import initialize_documentation from matplotlib import pyplot as plt initialize_documentation() fc = ee.FeatureCollection("FAO/GAUL/2015/level2").limit(3) d = fc.geetools.byProperties(properties=["ADM1_CODE", "ADM2_CODE"]) d.getInfo()
{'ADM1_CODE': {'00000000000000000253': 48357, '00000000000000000267': 115003, '00000000000000000269': 115003}, 'ADM2_CODE': {'00000000000000000253': 115068, '00000000000000000267': 115032, '00000000000000000269': 115069}}