Uncomment the following line to install geemap if needed.
# !pip install geemap
import ee
import geemap
import geemap.colormaps as cm
If run into errors, uncomment the following line to update the package and restart the kernel to take effect.
# geemap.update_package()
Map = geemap.Map()
Map
Draw a rectangle/polygon on the map to be used as an Area of Interest (AOI). If no AOI is specified, the entire image collection will be used.
region = Map.user_roi
Use any Earth Engine collection to filter data, for example, using Landsat 8 Collection 2.
collection = ee.ImageCollection("LANDSAT/LC08/C02/T1_L2")
You can filter the image collection by region and date range. Set clip=True
if you want to clip the resulting image to the region boundary.
image = geemap.image_count(
collection, region, start_date='2021-01-01', end_date='2022-01-01', clip=False
)
Set visualization parameters.
vis = {'min': 0, 'max': 60, 'palette': cm.palettes.coolwarm}
Map.addLayer(image, vis, 'Landsat 8 Image Count')
Add country boundaries to the map
countries = ee.FeatureCollection('users/giswqs/public/countries')
style = {"color": "00000088", "width": 1, "fillColor": "00000000"}
Map.addLayer(countries.style(**style), {}, "Countries")
Map.add_colorbar(vis, label='Landsat 8 Image Count')
Map