JustPaste.it

var collection = ee.ImageCollection('COPERNICUS/S5P/NRTI/L3_NO2')
  .select('NO2_column_number_density')
  .filterDate('2023-08-22', '2023-08-23');

var band_viz = {
  min: 0,
  max: 0.0002,
  palette: ['black', 'blue', 'purple', 'cyan', 'green', 'yellow', 'red']
};

 

// Load the shapefile as a FeatureCollection
var studyArea = ee.FeatureCollection('projects/ee-anisghattassi/assets/Limit');

 

// Filter the collection based on the study area
var collectionFiltered = collection.filterBounds(studyArea.geometry());

 

// Calculate the mean of the filtered collection
var no2Mean = collectionFiltered.mean();

 

// Clip the image to the study area
var clippedImage = no2Mean.clip(studyArea);

 

// Center the map on the study area
Map.centerObject(studyArea, 10);

 

// Add the Clipped NO2 layer to the map
Map.addLayer(clippedImage, band_viz, 'S5P NO2');

 

// Export the image
Export.image.toDrive({
  image: clippedImage,
  description: 'NO2_distribution',
  scale: 10,
  region: studyArea.geometry().bounds()
});