// Get a feature collection of Thailand var c = ee.FeatureCollection('USDOS/LSIB_SIMPLE/2017').filter(ee.Filter.eq('country_na', 'Thailand')); //Map.addLayer(c); var dataset = ee.ImageCollection('COPERNICUS/S5P/NRTI/L3_NO2') .filterDate('2021-11-01', '2022-04-30') .filterBounds(c) .select('NO2_column_number_density').median(); var mask = dataset.gt(0.00008); var nox = dataset.updateMask(mask); var band_viz = { min: 0.00001, max: 0.00025, palette: ['black', 'blue', 'purple', 'cyan', 'green', 'yellow', 'red'] }; Map.addLayer(nox.clip(c), band_viz, 'S5P N02'); Map.setOptions('SATELLITE'); Map.centerObject(c, 6); // NO2 Get a feature collection of Thailand var c = ee.FeatureCollection('USDOS/LSIB_SIMPLE/2017').filter(ee.Filter.eq('country_na', 'Thailand')); //Map.addLayer(c); var dataset = ee.ImageCollection('COPERNICUS/S5P/NRTI/L3_NO2') .filterDate('2022-01-01', '2022-02-15') .select('NO2_column_number_density').median(); var mask = dataset.gt(0.00008); var nox = dataset.updateMask(mask); var vis = { min: 0.00001, max: 0.00025, palette: ['black', 'blue', 'purple', 'cyan', 'green', 'yellow', 'red'] }; /* * Legend setup */ // Creates a color bar thumbnail image for use in legend from the given color // palette. function makeColorBarParams(palette) { return { bbox: [0, 0, 1, 0.1], dimensions: '100x10', format: 'png', min: 0, max: 1, palette: palette, }; } // Create the color bar for the legend. var colorBar = ui.Thumbnail({ image: ee.Image.pixelLonLat().select(0), params: makeColorBarParams(vis.palette), style: {stretch: 'horizontal', margin: '0px 8px', maxHeight: '24px'}, }); // Create a panel with three numbers for the legend. var legendLabels = ui.Panel({ widgets: [ ui.Label(vis.min, {margin: '4px 8px'}), ui.Label( (vis.max / 2), {margin: '4px 8px', textAlign: 'center', stretch: 'horizontal'}), ui.Label(vis.max, {margin: '4px 8px'}) ], layout: ui.Panel.Layout.flow('horizontal') }); var legendTitle = ui.Label({ value: 'Map Legend: Total vertical column of NO2 (mol/m^2)', style: {fontWeight: 'bold'} }); // Add the legendPanel to the map. var legendPanel = ui.Panel([legendTitle, colorBar, legendLabels]); Map.add(legendPanel); Map.centerObject(c,5.5); Map.setOptions('SATELLITE');