The Google Earth Engine Python API does not come with a charting module. But you can use third-party modules to create interactive charts. You may also convert the Earth Engine objects to a Pandas dataframe and plot it using Python libraries like Matplotlib

This notebook shows how to use the geemap package to create a Time-Series Chart from a ImageCollection.


In [ ]:
import ee
In [ ]:
In [ ]:

Load the TerraClimate collection and select the 'tmmx' band.

In [ ]:
terraclimate = ee.ImageCollection("IDAHO_EPSCOR/TERRACLIMATE")
tmax ='tmmx')

Define a point location for the chart.

In [ ]:
geometry = ee.Geometry.Point([77.57738128916243, 12.964758918835752])

Scale the band values so they are in Degree Celcius.

In [ ]:
def scale_image(image):
  return ee.Image(image).multiply(0.1)\
    .copyProperties(image, ['system:time_start'])

tmaxScaled =

Filter the collection.

In [ ]:
filtered = tmaxScaled.filter('1970-01-01', '2020-01-01')) \
                     .filter(ee.Filter.intersects('.geo', geometry))

To chart an image series in Python, we must first extract the values from each image and create a FeatureCollection.

In [ ]:
def extract_data(image):
    stats = image.reduceRegion(**{ 
    properties = {
        'month': image.get('system:index'),
        'tmmx': stats.get('tmmx')
    return ee.Feature(None, properties)

data = ee.FeatureCollection(
In [ ]:

Create an Interactive Chart using geemap

In [ ]:
from geemap import chart
In [ ]:
options = {
    'title': 'Max Monthly Temperature at Bangalore', 
    'legend_location': 'top-right',
    'height': '500px',
    'ylabel': 'Temperature (C)'
In [ ]:
chart.feature_byFeature(data, 'month', ['tmmx'], **options)

Create a chart using Matplotlib

We can convert a FeatureCollection to a DataFrame using geemap helper function ee_to_pandas.

In [ ]:
import geemap
df = geemap.ee_to_pandas(data)

Now we have a regular Pandas dataframe that can be plotted with matplotlib.

In [ ]:
%matplotlib inline
import matplotlib.pyplot as plt
In [ ]:
fig, ax = plt.subplots()

        title='Max Monthly Temperature at Bangalore',
        ylabel='Temperature (C)')

In [ ]: