Saturday, 6 January 2018

google earth engine - Exporting time series of multiple polygons to .csv without using ui.Chart.image.seriesByRegion command


Following the example provided in the GE tutorial (see below), how can I export the data to a .csv without using the ui.Chart.image.seriesByRegion?


// Define a FeatureCollection: regions of the American West.
var regions = ee.FeatureCollection([
ee.Feature( // San Francisco.

ee.Geometry.Rectangle(-122.45, 37.74, -122.4, 37.8), {label: 'City'}),
ee.Feature( // Tahoe National Forest.
ee.Geometry.Rectangle(-121, 39.4, -120.8, 39.8), {label: 'Forest'}),
ee.Feature( // Black Rock Desert.
ee.Geometry.Rectangle(-119.15, 40.8, -119, 41), {label: 'Desert'})
]);

// Load Landsat 8 brightness temperature data for 1 year.
var temps2013 = ee.ImageCollection('LANDSAT/LC8_L1T_32DAY_TOA')
.filterDate('2012-12-25', '2013-12-25')

.select('B11');

// Create a time series chart.
var tempTimeSeries = ui.Chart.image.seriesByRegion(
temps2013, regions, ee.Reducer.mean(), 'B11', 200, 'system:time_start', 'label')
.setChartType('ScatterChart')
.setOptions({
title: 'Temperature over time in regions of the American West',
vAxis: {title: 'Temperature (Kelvin)'},
lineWidth: 1,

pointSize: 4,
series: {
0: {color: 'FF0000'}, // urban
1: {color: '00FF00'}, // forest
2: {color: '0000FF'} // desert
}});

// Display.
print(tempTimeSeries);


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...