ipygee.ee_feature_collection#
Toolbox for the ee.FeatureCollection class.
Classes#
Initialize the FeatureCollectionAccessor class. |
Module Contents#
- class ipygee.ee_feature_collection.FeatureCollectionAccessor(obj)[source]#
Initialize the FeatureCollectionAccessor class.
- Parameters:
obj (ee.FeatureCollection)
- plot_by_features(type='bar', featureId='system:index', properties=None, labels=None, colors=None, figure=None, **kwargs)[source]#
Plot the values of a
ee.FeatureCollectionby feature.Each feature property selected in properties will be plotted using the
featureIdas the x-axis. If nopropertiesare provided, all properties will be plotted. If nofeatureIdis provided, the"system:index"property will be used.Warning
This function is a client-side function.
- Parameters:
type (str) – The type of plot to use. Defaults to
"bar". can be any type of plot from the python libmatplotlib.pyplot. If the one you need is missing open an issue!featureId (str) – The property to use as the x-axis (name the features). Defaults to
"system:index".properties (list[str] | None) – A list of properties to plot. Defaults to all properties.
labels (list[str] | None) – A list of labels to use for plotting the properties. If not provided, the default labels will be used. It needs to match the properties’ length.
colors (list[str] | None) – A list of colors to use for plotting the properties. If not provided, the default colors from the matplotlib library will be used.
figure (bokeh.plotting.figure | None) – The bokeh figure to plot the data on. If None, a new figure is created.
kwargs – Additional arguments from the
pyplottype selected.
- Return type:
bokeh.plotting.figure
Examples
- plot_by_properties(type='bar', featureId='system:index', properties=None, labels=None, colors=None, figure=None, **kwargs)[source]#
Plot the values of a
ee.FeatureCollectionby property.Each features will be represented by a color and each property will be a bar of the bar chart.
Warning
This function is a client-side function.
- Parameters:
type (str) – The type of plot to use. Defaults to
"bar". can be any type of plot from the python libmatplotlib.pyplot. If the one you need is missing open an issue!featureId (str) – The property to use as the y-axis (name the features). Defaults to
"system:index".properties (list[str] | ee.List | None) – A list of properties to plot. Defaults to all properties.
labels (list[str] | None) – A list of labels to use for plotting the properties. If not provided, the default labels will be used. It needs to match the properties’ length.
colors (list[str] | None) – A list of colors to use for plotting the properties. If not provided, the default colors from the matplotlib library will be used.
figure (bokeh.plotting.Feature | None) – The bokeh figure to plot the data on. If None, a new figure is created.
kwargs – Additional arguments from the
pyplotfunction.
- Return type:
bokeh.plotting.Feature
Examples
- plot_hist(property, label='', figure=None, color=None, **kwargs)[source]#
Plot the histogram of a specific property.
Warning
This function is a client-side function.
- Parameters:
property (str | ee.String) – The property to display
label (str) – The label to use for the property. If not provided, the property name will be used.
figure (bokeh.plotting.figure | None) – The bokeh figure to plot the data on. If None, a new figure is created.
color (str | None) – The color to use for the plot. If not provided, the default colors from the matplotlib library will be used.
**kwargs – Additional arguments from the
matplotlib.pyplot.hist()function.
- Return type:
bokeh.plotting.figure
Examples