[GIS] Google Earth Engine. How to get cloud cover score for each image in image collection

cloud covergoogle-earth-engine

I want to estimate cloud cover of each image in an image collection + would like to print out results for every image. I can see that cloud cover estimates are available for each image in their properties. But how to extract them to one table?

I am using this data:

//Load data collection
var l7r = ee.ImageCollection("LANDSAT/LE7_L1T")
.filter(ee.Filter.eq('WRS_PATH', 144))
.filter(ee.Filter.eq('WRS_ROW', 51));

Best Answer

I found this answer by Christoph in the Google Earth Engine Developers Forum (https://groups.google.com/forum/#!forum/google-earth-engine-developers).

var getCloudScores = function(img){
    //Get the cloud cover
    var value = ee.Image(img).get('CLOUD_COVER');
    return ee.Feature(null, {'score': value})
};

var results = landsat.map(getCloudScores);
print(Chart.feature.byFeature(results));

Or you can export data to drive:

// Export data to drive
Export.table.toDrive({
  collection: results, 
  description: 'File_Name',
  fileFormat: 'CSV'
});
Related Question