How do I get surface temperature variation with a time series chart?
I have tried the same code on different data but it does not work with this one.
var dataset = ee.ImageCollection("JAXA/GCOM-C/L3/OCEAN/SST/V3")
.filterDate('2023-01-24', '2023-02-03')
// filter to daytime data only
.filter(ee.Filter.eq("SATELLITE_DIRECTION", "D"));
print(dataset);
// Clip the dataset to the geometry
var clipped = dataset.mean().clip(geometry).select('SST_AVE').set('system:time_start', dataset.get('system:time_start'));
// Multiply with slope coefficient and add offset
var scaled = clipped.multiply(0.0012).add(-10);
// Define the visualization parameters
var vis = {
bands: ['SST_AVE'],
min: 0,
max: 10,
palette: ['000000', '005aff', '43c8c8', 'fff700', 'ff0000'],
};
Map.centerObject(geometry, 10);
Map.addLayer(scaled, vis, "Clipped and scaled SST");
var chart = ui.Chart.image.series({
imageCollection: scaled,
region: geometry,
reducer: ee.Reducer.mean(),
scale: 1000,
xProperty: 'system:time_start',
});