I'm trying to find the area of a classified land cover across the study area using the Google Earth Engine's Python API. I am trying to do this by mapping a .reduceRegion
function across the image collection using the approach below.
# Salt marsh extents are images where pixels = 1 if salt marsh has been detected
salt_marsh_area = salt_marsh_extents.map(lambda image:
image.reduceRegion(
reducer=ee.Reducer.sum(),
geometry=whole_estuary.geometry(),
scale=30
))
However, when I try and export this to my Google Drive or use a .getInfo()
to inspect the result I get an error of ee.ee_exception.EEException: Collection.map: A mapped algorithm must return a Feature or Image.
How do you convert this into a table format for export?