import ee import geemap import geemap.chart as chart # from geemap import chart # geemap.update_package() Map = geemap.Map() features = ee.FeatureCollection("projects/google/charts_feature_example").select( "[0-9][0-9]_tmean|label" ) Map.addLayer(features, {}, "Ecoregions") Map df = geemap.ee_to_df(features) df xProperty = "label" yProperties = [str(x).zfill(2) + "_tmean" for x in range(1, 13)] labels = [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", ] colors = [ "#604791", "#1d6b99", "#39a8a7", "#0f8755", "#76b349", "#f0af07", "#e37d05", "#cf513e", "#96356f", "#724173", "#9c4f97", "#696969", ] title = "Average Monthly Temperature by Ecoregion" xlabel = "Ecoregion" ylabel = "Temperature" options = { "labels": labels, "colors": colors, "title": title, "xlabel": xlabel, "ylabel": ylabel, "legend_location": "top-left", "height": "500px", } chart.feature_byFeature(features, xProperty, yProperties, **options) ecoregions = ee.FeatureCollection("projects/google/charts_feature_example") normClim = ( ee.ImageCollection("OREGONSTATE/PRISM/Norm81m").toBands().select("[0-9][0-9]_tmean") ) geemap.ee_to_df(ecoregions) normClim fc = geemap.zonal_stats( normClim, ecoregions, stat_type="MEAN", scale=500, return_fc=True, verbose=False ) geemap.ee_to_df(fc) Map = geemap.Map() features = ee.FeatureCollection("projects/google/charts_feature_example").select( "[0-9][0-9]_ppt|label" ) Map.addLayer(features, {}, "Features") Map df = geemap.ee_to_df(features) df keys = [str(x).zfill(2) + "_ppt" for x in range(1, 13)] values = [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", ] xProperties = dict(zip(keys, values)) seriesProperty = "label" options = { "title": "Average Ecoregion Precipitation by Month", "colors": ["#f0af07", "#0f8755", "#76b349"], "xlabel": "Month", "ylabel": "Precipitation (mm)", "legend_location": "top-left", "height": "500px", } chart.feature_byProperty(features, xProperties, seriesProperty, **options) Map = geemap.Map() features = ee.FeatureCollection("projects/google/charts_feature_example") xProperty = "label" yProperty = "01_tmean" seriesProperty = "warm" options = { "title": "Average January Temperature by Ecoregion", "colors": ["#cf513e", "#1d6b99"], "xlabel": "Ecoregion", "ylabel": "Jan temp (C)", "legend_location": "top-right", "height": "500px", "labels": ["Warm", "Cold"], } chart.feature_groups(features, xProperty, yProperty, seriesProperty, **options)