/
// Collections of single images - Landsat 8 Surface Reflectance
/
// Create and Earth Engine Point object over San Francisco.
var pointSF = ee.Geometry.Point([-122.44, 37.76]);
// Import the Landsat 8 Surface Reflectance collection.
var landsat8SR = ee.ImageCollection('LANDSAT/LC08/C02/T1_L2');
// Filter the collection and select the first image.
var landsat8SRimage = landsat8SR.filterDate('2014-03-18', '2014-03-19') .filterBounds(pointSF) .first();
print('Landsat 8 Surface Reflectance image', landsat8SRimage);
// Center map to the first image.
Map.centerObject(landsat8SRimage, 8);
// Add first image to the map.
Map.addLayer(landsat8SRimage, {
bands: ['SR_B4', 'SR_B3', 'SR_B2'],
min: 7000,
max: 13000 },
'Landsat 8 SR');
these datasets meant to minimize the effects of the atmosphere between Earth’s surface and the satellite.
Map.centerObject : center the map on the landsatFirst image with a zoom level of 8(zoom levels go from 0 to 24).
MODIS Daily True-Color Imagery
different MODIS bands produce data at different spatial resolutions.For the visible bands, the lowest common resolution is 500 m (red and NIR are 250 m).
Some of the MODIS bands have proven useful in determining where fires are burning and what areas they have burned.methane (CH4) reflects the 760 nm portion of the spectrum.
/
// Pre-made composites
/
// Import a MODIS dataset of daily BRDF-corrected reflectance.
var modisDaily = ee.ImageCollection('MODIS/006/MCD43A4');
// Filter the dataset to a recent date.
var modisDailyRecent = modisDaily.filterDate('2021-11-01');
// Add the dataset to the map.
var modisVis = { bands: [ 'Nadir_Reflectance_Band1', 'Nadir_Reflectance_Band4', 'Nadir_Reflectance_Band3' ],
min: 0,
max: 4000 };
Map.addLayer(modisDailyRecent, modisVis, 'MODIS Daily Composite');
//how there are no clouds in the image, but there are some pixels with no data . These are persistently cloudy areas that have no clear pixels in the particular period chosen.
// Import the MODIS monthly burned areas dataset.
var modisMonthly = ee.ImageCollection('MODIS/006/MCD64A1');
// Filter the dataset to a recent month during fire season.
var modisMonthlyRecent = modisMonthly.filterDate('2021-08-01');
// Add the dataset to the map.
Map.addLayer(modisMonthlyRecent, {}, 'MODIS Monthly Burn');
The European Space Agency makes available a methane dataset from Sentinel-5 in Earth Engine.
palette : display a single band of an image in color.
/
// Other satellite products
/
// Import a Sentinel-5 methane dataset.
var methane = ee.ImageCollection('COPERNICUS/S5P/OFFL/L3_CH4');
// Filter the methane dataset.
var methane2018 = methane.select( 'CH4_column_volume_mixing_ratio_dry_air') .filterDate('2018-11-28', '2018-11-29') .first();
// Make a visualization for the methane data.
var methaneVis = { palette: ['black', 'blue', 'purple', 'cyan', 'green', 'yellow', 'red' ], min: 1770, max: 1920 };
// Center the Map.
Map.centerObject(methane2018, 3);
// Add the methane dataset to the map.
Map.addLayer(methane2018, methaneVis, 'Methane');
Many weather and climate datasets are available in Earth Engine.
// Import the ERA5 Monthly dataset
var era5Monthly = ee.ImageCollection('ECMWF/ERA5/MONTHLY');
// Filter the dataset
var era5MonthlyTemp = era5Monthly.select('mean_2m_air_temperature') .filterDate('2018-01-01', '2019-01-31') .first();
// Add the ERA dataset to the map.
Map.addLayer(era5MonthlyTemp,
{
palette: ['yellow', 'red'],
min: 260, max: 320 },
'ERA5 Max Monthly Temp');
Pre-classified Land Use and Land Cover
Another type of dataset available in Earth Engine is LULC maps that have already been classified.
use it to assign a label to each pixel on Earth’s surface.
The European Space Agency (ESA) provides a global land cover map for the year 2020 based on Sentinel-1 and Sentinel-2 data.
WorldCover uses 11 different land cover classes including built-up, cropland, open water, and mangroves.
/
// Pre-classified Land Use Land Cover
/
// Import the ESA WorldCover dataset.
var worldCover = ee.ImageCollection('ESA/WorldCover/v100').first();
// Center the Map. Map.centerObject(worldCover, 3);
// Add the worldCover layer to the map.
Map.addLayer(worldCover, { bands: ['Map'] }, 'WorldCover');
Global Forest Change
Global Forest Change dataset:this dataset focuses on the percent of tree cover across the Earth’s surface in a base year of 2000, and how that has changed over time.
// Import the Hansen Global Forest Change dataset.
var globalForest = ee.Image( 'UMD/hansen/global_forest_change_2020_v1_8');
// Create a visualization for tree cover in 2000.
var treeCoverViz = {
bands: ['treecover2000'],
min: 0,
max: 100,
palette: ['black', 'green'] };
// Add the 2000 tree cover image to the map.
Map.addLayer(globalForest, treeCoverViz, 'Hansen 2000 Tree Cover');
// Create a visualization for the year of tree loss over the past 20 years.
var treeLossYearViz = {
bands: ['lossyear'],
min: 0,
max: 20,
palette: ['yellow', 'red'] };
// Add the 2000-2020 tree cover loss image to the map.
Map.addLayer(globalForest, treeLossYearViz, '2000-2020 Year of Loss');
Gridded Population Count
The Gridded Population of the World dataset estimates human population for each grid cell across the entire Earth’s surface.
/
// Other datasets
/
// Import and filter a gridded population dataset.
var griddedPopulation = ee.ImageCollection( 'CIESIN/GPWv411/GPW_Population_Count') .first();
// Predefined palette.
var populationPalette = [ 'ffffe7', '86a192', '509791', '307296', '2c4484', '000066' ]; // Center the Map. Map.centerObject(griddedPopulation, 3);
// Add the population data to the map.
Map.addLayer(griddedPopulation,
{
min: 0,
max: 1200,
'palette': populationPalette },
'Gridded Population');
Digital Elevation Models
// Import the NASA DEM Dataset.
var nasaDEM = ee.Image('NASA/NASADEM_HGT/001');
// Add the elevation layer to the map.
Map.addLayer(nasaDEM, { bands: ['elevation'], min: 0, max: 3000 }, 'NASA DEM');