// Lab I am getting: Linear Regression var ROI = ee.FeatureCollection("users/enigma_srl/MADHYAPRADESH_DISTRICTS");
/// This function adds a band representing the image timestamp.
Request payload size exceeds limit
var addTime = function (image) { returnwhile exporting image.addBands (image.metadata('system:time_start') .divide (1000606024365)); };
// and map the time band function over it.
var collection = ee.ImageCollection("COPERNICUS/S5P/OFFL/L3_NO2")
.filterDate('2019-01-01', '2022-12-31')
.map(addTime)
.filterBounds (ROI);
var trend = collection.select(['system:time_start', 'NO2_column_number_density'])
// Compute the linear trend over time.
.reduce(ee. Reducer.linearFit()); from google earth engine
// Display This is the trend with increasing slopes in green, decreasing in red.
Map.centerObject (ROI, 6);
Map.addLayer(trend.clip(ROI), {min: 0, max: [ -0.00051, 0.0192, 1000], bands: ['scale', 'scale', 'offset']}, 'Air Quality trend over MP');
Export.image.toDrive({
image: trend ,
descriptioncode: 'Linear fit',
region: ROI,
scale: 30, });
// Lab: Linear Regression
var ROI = ee.FeatureCollection("users/enigma_srl/MADHYAPRADESH_DISTRICTS");
/// This function adds a band representing the image timestamp.
var addTime = function (image) {
return image.addBands (image.metadata('system:time_start') .divide (1000*60*60*24*365));
};
// and map the time band function over it.
var collection = ee.ImageCollection("COPERNICUS/S5P/OFFL/L3_NO2")
.filterDate('2019-01-01', '2022-12-31')
.map(addTime)
.filterBounds (ROI);
var trend = collection.select(['system:time_start', 'NO2_column_number_density'])
// Compute the linear trend over time.
.reduce(ee. Reducer.linearFit());
// Display the trend with increasing slopes in green, decreasing in red.
Map.centerObject (ROI, 6);
Map.addLayer(trend.clip(ROI), {min: 0, max: [ -0.00051, 0.0192, 1000], bands: ['scale', 'scale', 'offset']}, 'Air Quality trend over MP');
Export.image.toDrive({
image: trend ,
description: 'Linear fit',
region: ROI,
scale: 30,
});
This is the code. Any suggestions as to how toHow do I export the image?