Geographic Information Systems Asked by waldo on August 30, 2021
I am trying to create a graph with the cloud cover over time, per year. The following code gives me a graph, but I don’t manage to get the dates on the x-axis line up chronological. Am I doing something wrong?
Secondly, this line contains 2 years of Landsat 8 data, I would like compare the annual values with the averaged values of the entire time series (in this case 2 years). Any ideas how to do so?
// ------CLOUD COVER CHART--------------------------------------------
var l8toa = l8.filterBounds(aoi);
var results = l8toa.map(getCloudScores);
var chart = ui.Chart.feature.byFeature(results)
.setChartType('LineChart')
.setOptions({
title: 'Cloud Cover over Time',
hAxis: {
title: 'Date',
/* ticks: [{v: 1, f: 'January'},
{v: 4, f: 'April'},
{v: 7, f: 'July'},
{v: 10, f: 'October'}]*/},
vAxis: {
title: 'Cloud Cover'
},
lineWidth: 1,
pointSize: 3
});
Set the xProperty
parameter in the Chart constructor to an array of dates. aggregate_array()
may be useful for that.
Answered by Nicholas Clinton on August 30, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP