Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Google Earth Engine Tutorial Pt.

VII
Charts – Histograms and Time-Series
Zachary Noah and J.B. Sharma, University of North Georgia
Objectives:
To create a histogram graph as well as a time series graph from band values of an image
collection
Procedure:
Histogram
1. Import the counties of the United States used in the previous tutorial as well as the Global
Multi-resolution Terrain Elevation data set. Create a feature variable for Georgia that
using the state abreviation column to select all counties whose value in the column is
“GA”.

2. Use the Chart.image.histogram() function to create the histogram object. The function
takes four parameters: the image, the region you are charting, the scale, the maximum
number of buckets (the amount of columns the histogram is split into), and the minimum
size of each bucket.

3. Use the .setOptions() function to set the name of the graph. You can also use the
setOptions() function to set the colors of the graph. Use the print() function to display the
graph.

1
Play around with the parameters of the chart function to modify the graph.
Timeseries
1. Import the Landsat 8 TOA corrected imagery. Create the variable landsat_bands using
the select function on the landsat imagery collection to create a new imagery collection
consisting of bands 1 through 9. Load the Georgia feature and clip the new variable to it.

2. Use the feature creation tool in the top left corner of the map to create a new point feature
and then give the new variable the name point. Create a new buffered feature variable by
using the buffer() function on the point that you have selected. You can also create a
polygon to observe the change in band values over time in the area of the polygon.

2
3. Using the Chart.image.series() function, pass it the landsat_bands image collection, your
point of polygon feature, a ee.Reducer.mean() object, and a scale parameter. The Reducer
function is the same as thet compositing function used in a previous tutorial. You can also
use the .min() or max() function. Use the print function to print the chart function.

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International


License.

You might also like