I am using code from the emapr lab to learn to use LandTrendr to get mean NDVI values per year for a geometry. I am trying to export the generated list from earth engine to Drive. The list only contains Year, Original NDVI and Fitted NDVI values. The error I am getting is- "Unknown element type provided: object. Expected: ee.Image, ee.ImageCollection, ee.FeatureCollection or ee.Element." How can I convert a list in order to export it to drive as a csv?
A link to the code I am using.
The end bit of my code:
var yearSummary = getSummary(yearBandStack, aoi, summaryScale).toArray();
var rawSummary = getSummary(rawBandStack, aoi, summaryScale).toArray();
var fitSummary = getSummary(fitBandStack, aoi, summaryScale).toArray();
var chartArray = ee.Array.cat([yearSummary, rawSummary, fitSummary], 1).getInfo();
chartArray = [['Year', 'Original', 'Fitted']].concat(chartArray);
print(chartArray)
Export.table.toDrive({
collection: chartArray,
folder: 'Test_Folder',
description:'test_chartArray',
fileFormat: 'CSV'
});