Skip to content

Instantly share code, notes, and snippets.

@ghtmtt
Created Aug 4, 2020
Embed
What would you like to do?
import ee
from ee_plugin import Map
# Sentinel data
collection = ee.ImageCollection('COPERNICUS/S5P/OFFL/L3_NO2')
# Band of NO2
collection = collection.select('tropospheric_NO2_column_number_density')
# 2019 data
collection2019 = collection.filterDate('2019-03-01', '2019-04-30')
# 2020 data
collection2020 = collection.filterDate('2020-03-01', '2020-04-30')
# Milano county borders
dataset = ee.FeatureCollection('FAO/GAUL/2015/level2');
area = dataset.filter(ee.Filter.inList('ADM2_NAME', ee.List(["Milano"])))
# mean calculation of all layers and area clipping
region_clip_2019 = collection2019.mean().clip(area)
region_clip_2020 = collection2020.mean().clip(area)
# vizualization options
band_viz = {
'min': 0,
'max': 0.0002,
}
# loading XYZ data
Map.addLayer(region_clip_2019, band_viz, 'NO2019')
Map.addLayer(region_clip_2020, band_viz, 'NO2020')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment