1

I have shapefile of counties and want to calculate mean NDVI for each. I know reducing connected components and ee.reducer.mean can be helpful in GEE but it wants it as CSV for further analysis in R pl.

1 Answer 1

2

First you have to use .reduceRegions() to reduce your NDVI image over regions represeted as counties with ee.Reducer.mean() reducer.

Then do export with Export.table.toDrive() setting fileFormat to 'csv'.

Here's official tutorial and here's a link to a complete script with exporting.

Note: by default CSV output will contain all attributes from source features + column with an output of a chosen reducer - "mean" in this case.

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.