How can I create NDVI time series from a single polygon of shapefile using Google Earth Engine?

by Floriana Spatola   Last Updated October 09, 2019 14:22 PM

I am new in Google Earth Engine, I am trying to plot ndvi timeseries from a single polygon of shapefile, but when I run the code I get "Error generating chart: Collection query aborted after accumulating over 5000 elements".

var broad_leaved= ee.FeatureCollection('users/spatola/MCD45A1_broad_leaved_311/MCD45A1_2004_clc311');
var modis = ee.ImageCollection('MODIS/006/MOD13Q1');
var modisNDVI = modis.filterBounds(broad_leaved)
                    .filterDate('2002-01-01', '2009-12-31')
                    .select('NDVI');
                    print(modisNDVI);
var timeseries = ui.Chart.image.seriesByRegion(
  modisNDVI, broad_leaved , ee.Reducer.mean(), 'NDVI', 250)
  .setOptions({
    title : 'vegetation series',
    xAxis : {title : 'YEAR'},
    yAxis : {title : 'NDVI'}
    });
  print(timeseries);


Related Questions


Updated January 04, 2017 08:09 AM

Updated November 04, 2018 12:22 PM

Updated March 04, 2019 16:22 PM

Updated July 09, 2018 09:22 AM

Updated August 27, 2019 15:22 PM