1

I'm calculating a Producer's accuracy in Google Earth Engine and I can't export it as a table or CSV to do the rest of my work in Python.

Is there any way to export it?

I already tried export.table.toDrive but it doesn't work! here is my code:

Export.table.toDrive({
  collection: (ee.Element(confusionMatrix98_99.producersAccuracy())),
  description: 'Producers_accuracy400_99',
  folder: 'earthengine',
  fileFormat: 'CSV'
});
1
  • 2
    Welcome to GIS SE. As a new user, please take the Tour. Coding question on GIS SE should include relevant existing code, otherwise it's most likely to be closed as not compliant with the site policy. Please edit your question and add relevant existing code. Commented Mar 22, 2023 at 8:42

1 Answer 1

2

The collection property must be a feature collection. Just add your producer accuracy as a property in a feature in a feature collection, then export. va

r producersAccuracy = confusionMatrix98_99.producersAccuracy()
Export.table.toDrive({
  collection: ee.FeatureCollection(ee.Feature(null, {producersAccuracy: producersAccuracy})),
  description: 'Producers_accuracy400_99',
  folder: 'earthengine',
  fileFormat: 'CSV',
  selectors: ['producersAccuracy']
})

https://code.earthengine.google.com/eea5ea8653a5e70e6325abd3a7e23e80

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.