I have multiple points representing different crops for an area (say 100 per crop, and 5 types of crops). I compute the Sentinel2 NDVI for a period of one year. Even if I filter for just one type of crop ('landcover',1) it collapses and returns: "Error generating chart: Collection query aborted after accumulating over 5000 elements." I would like to get on line per point (after filtering for just one type of crop if necessary), so then I can export and plot it in R.

var geometry = ee.FeatureCollection("users/delaralfonso/ROIs_CBA/WPT_Tucuman_E1819_51");
//geometry = geometry.filter(ee.Filter.eq('landcover',1));
//geometry = geometry.limit(100)

var s2 = ee.ImageCollection("COPERNICUS/S2")
  .filter(ee.Filter.lt("CLOUDY_PIXEL_PERCENTAGE", 5))

function getNDVI (image){
  var red = ee.Image(image.select('B4'));
  var nir = ee.Image(image.select('B8A'));
  var ndvi = (nir.subtract(red)).divide(nir.add(red)).rename('ndvi');
  return image.addBands(ndvi);
var collection = s2.map(getNDVI).select('ndvi');
Map.addLayer(collection,{}, "Collection NDVI", false)

// Create a time series chart.
var NDVITimeSeries = ui.Chart.image.seriesByRegion(
    collection, geometry, ee.Reducer.mean(), 'ndvi', 20, 'system:time_start', 'landcover')
          title: 'Series temporales NDVI para los ditintos ROIs',
          vAxis: {title: 'NDVI'},
          lineWidth: 1,
          pointSize: 4});

Any workaround for my issue? Maybe not visualize but just export it?

| improve this question | | | | |