Uncomment the following line to install geemap if needed.
# !pip install geemap
import ee
import geemap
Map = geemap.Map()
Map
centroid = ee.Geometry.Point([-122.4439, 37.7538])
landsat = ee.ImageCollection("LANDSAT/LC08/C01/T1_SR").filterBounds(centroid).first()
landsat_vis = {"min": 0, "max": 3000, "bands": ["B5", "B4", "B3"]}
Map.centerObject(centroid, 8)
Map.addLayer(landsat, landsat_vis, "Landsat-8")
naip = ee.ImageCollection("USDA/NAIP/DOQQ").filterBounds(centroid).first()
naip_vis = {"bands": ["N", "R", "G"]}
Map.addLayer(naip, naip_vis, "NAIP")
landsat.propertyNames().getInfo()
landsat.get("CLOUD_COVER").getInfo()
# The number of milliseconds since 1970-01-01T00:00:00Z.
landsat.get("system:time_start").getInfo()
ee.Date(landsat.get("system:time_start")).format("YYYY-MM-dd").getInfo()
landsat_props = geemap.image_props(landsat)
landsat_props.getInfo()
landsat_props.get("IMAGE_DATE").getInfo()
naip_props = geemap.image_props(naip)
naip_props.getInfo()
naip_props.get("NOMINAL_SCALE").getInfo()
Including minimum, maximum, mean, standard deviation, and sum.
landsat_stats = geemap.image_stats(landsat, scale=90)
landsat_stats.getInfo()
naip_stats = geemap.image_stats(naip, scale=10)
naip_stats.getInfo()