我需要从Sentinel数据计算NDVI。它是从2015年到2019年的时间序列分析。ui.chart显示的错误点数超过5000。我可以用csv格式下载NDVI时间序列数据吗?
var puli = ee.ImageCollection('COPERNICUS/S2')
.filterDate('2015-01-01', '2019-12-31')
// Pre-filter to get less cloudy granules.
.filter(ee.Filter.lt('CLOUDY_PIXEL_PERCENTAGE', 10))
.filterBounds(geometry);
var rgbVis = {
min: 0.0,
max: 0.3,
bands: ['B4', 'B3', 'B2'],
};
var count = puli.size();
print (count)
Map.setCenter(80.16, 13.50, 9);
Map.addLayer(puli.median(), rgbVis, 'RGB');
// Define feature collections
var points = ee.FeatureCollection(agriculture);
Map.addLayer(points, {}, 'Features',true);
// NDVI calculation
var addNDVI = function(image) {
return image.addBands(image.normalizedDifference(['B8', 'B4']));
};
var with_ndvi = puli.map(addNDVI);
var rgb_vis = {min: 0, max: 5000, bands: ['B4', 'B3', 'B2']};
Map.addLayer(with_ndvi, {bands: 'nd', min: 0, max: 1}, 'NDVI');
// Time Series Analysis for NDVI
var TimeSeriesndvi = ui.Chart.image.doySeriesByRegion(with_ndvi,'nd',points,ee.Reducer.median(),1,ee.Reducer.mean(),'id').setChartType('ScatterChart')
.setOptions({
title: 'NDVI variations',
vAxis: {title: 'NDVI'},
lineWidth: 1,
pointSize: 4,
series: {
}});
print(TimeSeriesndvi);