ipygee.ee_image =============== .. py:module:: ipygee.ee_image .. autoapi-nested-parse:: Toolbox for the :py:class:`ee.Image` class. Classes ------- .. autoapisummary:: ipygee.ee_image.ImageAccessor Module Contents --------------- .. py:class:: ImageAccessor(obj) Initialize the Image class. .. py:method:: plot_by_bands(type, regions, reducer = 'mean', bands = None, regionId = 'system:index', labels = None, colors = None, figure = None, scale = 10000, crs = None, crsTransform = None, tileScale = 1) Plot the reduced values for each band. Each band will be plotted using the ``labels`` as x-axis label defaulting to band names if not provided. If no ``bands`` are provided, all bands will be plotted. If no ``regionId`` are provided, the ``"system:index"`` property will be used. .. warning:: This method is client-side. :param type: The type of plot to use. Defaults to ``"bar"``. can be any type of plot from the python lib ``matplotlib.pyplot``. If the one you need is missing open an issue! :param regions: The regions to compute the reducer in. :param reducer: The name of the reducer or a reducer object to use. Default is ``"mean"``. :param bands: The bands to compute the reducer on. Default to all bands. :param regionId: The property used to label region. Defaults to ``"system:index"``. :param labels: The labels to use for the output dictionary. Default to the band names. :param colors: The colors to use for the plot. Default to the default matplotlib colors. :param figure: The bokeh figure to plot the data on. If None, a new figure is created. :param scale: The scale to use for the computation. Default is 10000m. :param crs: The projection to work in. If unspecified, the projection of the image's first band is used. If specified in addition to scale, rescaled to the specified scale. :param crsTransform: The list of CRS transform values. This is a row-major ordering of the 3x2 transform matrix. This option is mutually exclusive with 'scale', and replaces any transform already set on the projection. :param tileScale: A scaling factor between 0.1 and 16 used to adjust aggregation tile size; setting a larger tileScale (e.g., 2 or 4) uses smaller tiles and may enable computations that run out of memory with the default. :returns: The bokeh figure with the plot .. rubric:: Examples .. code-block:: python import ee, ipygee ee.Initialize() ecoregions = ee.FeatureCollection("projects/google/charts_feature_example").select(["label", "value","warm"]) normClim = ee.ImageCollection('OREGONSTATE/PRISM/Norm91m').toBands() normClim.bokeh.plot_by_bands(ecoregions, ee.Reducer.mean(), scale=10000) .. py:method:: plot_by_regions(type, regions, reducer = 'mean', bands = None, regionId = 'system:index', labels = None, colors = None, figure = None, scale = 10000, crs = None, crsTransform = None, tileScale = 1) Plot the reduced values for each region. Each region will be plotted using the ``regionId`` as x-axis label defaulting to "system:index" if not provided. If no ``bands`` are provided, all bands will be plotted. If no ``labels`` are provided, the band names will be used. .. warning:: This method is client-side. :param type: The type of plot to use. Defaults to ``"bar"``. can be any type of plot from the python lib ``matplotlib.pyplot``. If the one you need is missing open an issue! :param regions: The regions to compute the reducer in. :param reducer: The name of the reducer or a reducer object to use. Default is ``"mean"``. :param bands: The bands to compute the reducer on. Default to all bands. :param regionId: The property used to label region. Defaults to ``"system:index"``. :param labels: The labels to use for the output dictionary. Default to the band names. :param colors: The colors to use for the plot. Default to the default matplotlib colors. :param figure: The bokeh figure to plot the data on. If None, a new figure is created. :param scale: The scale to use for the computation. Default is 10000m. :param crs: The projection to work in. If unspecified, the projection of the image's first band is used. If specified in addition to scale, rescaled to the specified scale. :param crsTransform: The list of CRS transform values. This is a row-major ordering of the 3x2 transform matrix. This option is mutually exclusive with 'scale', and replaces any transform already set on the projection. :param tileScale: A scaling factor between 0.1 and 16 used to adjust aggregation tile size; setting a larger tileScale (e.g., 2 or 4) uses smaller tiles and may enable computations that run out of memory with the default. :returns: The bokeh figure with the plot. .. rubric:: Examples .. code-block:: python import ee, ipygee ee.Initialize() ecoregions = ee.FeatureCollection("projects/google/charts_feature_example").select(["label", "value","warm"]) normClim = ee.ImageCollection('OREGONSTATE/PRISM/Norm91m').toBands() normClim.bokeh.plot_by_regions(ecoregions, ee.Reducer.mean(), scale=10000) .. py:method:: plot_hist(bins = 30, region = None, bands = None, labels = None, colors = None, precision = 2, figure = None, scale = 10000, crs = None, crsTransform = None, bestEffort = False, maxPixels = 10**7, tileScale = 1, **kwargs) Plot the histogram of the image bands. :param bins: The number of bins to use for the histogram. Default is 30. :param region: The region to compute the histogram in. Default is the image geometry. :param bands: The bands to plot the histogram for. Default to all bands. :param labels: The labels to use for the output dictionary. Default to the band names. :param colors: The colors to use for the plot. Default to the default matplotlib colors. :param precision: The number of decimal to keep for the histogram bins values. Default is 2. :param figure: The bokeh figure to plot the data on. If None, a new figure is created. :param scale: The scale to use for the computation. Default is 10,000m. :param crs: The projection to work in. If unspecified, the projection of the image's first band is used. If specified in addition to scale, rescaled to the specified scale. :param crsTransform: The list of CRS transform values. This is a row-major ordering of the 3x2 transform matrix. This option is mutually exclusive with 'scale', and replaces any transform already set on the projection. :param bestEffort: If the polygon would contain too many pixels at the given scale, compute and use a larger scale which would allow the operation to succeed. :param maxPixels: The maximum number of pixels to reduce. default to 10**7. :param tileScale: A scaling factor between 0.1 and 16 used to adjust aggregation tile size; setting a larger tileScale (e.g., 2 or 4) uses smaller tiles and may enable computations that run out of memory with the default. :param \*\*kwargs: Keyword arguments passed to the `matplotlib.fill_between() `_ function. :returns: The bokeh figure with the plot. .. rubric:: Examples .. code-block:: python import ee, ipygee ee.Initialize() normClim = ee.ImageCollection('OREGONSTATE/PRISM/Norm91m').toBands() normClim.bokeh.plot_hist() .. py:attribute:: _obj