2

I am getting the error "Error generating chart: No features contain non-null values of "system:time_start"

var CSmap = ee.FeatureCollection('USDOS/LSIB_SIMPLE/2017').filterMetadata('country_co', 'equals', 'CS');
var area = ee.FeatureCollection(CSmap);
var s2 = ee.ImageCollection("COPERNICUS/S5P/NRTI/L3_NO2").select('NO2_column_number_density')
.filterDate('2020-03-20', '2020-03-25').filterBounds(area);
var NO2 = s2.mosaic().clip(area);
var band_viz = {min: 0.0000489, max: 0.0001659,
  palette: ['black', 'blue', 'purple', 'cyan', 'green', 'yellow', 'red']};
Map.addLayer(NO2, band_viz, 'S5P N02');
Map.setCenter(67.5,30.4,5);
print(ui.Chart.image.series(NO2, area, ee.Reducer.mean() ,1000) 
    .setSeriesNames(['Nitrogen Oxies Levels'])
    .setOptions({
      title: 'Nitrogen Oxies Levels',
      lineWidth: 1,
      pointSize: 3}));
0

You are trying to use NO2, which is a single image without properties (as you reduced it to an image using mosaic()), instead of a imageCollection. You are probably willing to print your imageCollection variable s2.

print(ui.Chart.image.series(s2,area, ee.Reducer.mean() ,1000) 
    .setSeriesNames(['Nitrogen Oxies Levels'])
    .setOptions({
      title: 'Nitrogen Oxies Levels',
      lineWidth: 1,
      pointSize: 3}));
|improve this answer|||||
  • Many thanks Kuik, it worked successfully. – Talha Zia Mar 26 at 8:44

Not the answer you're looking for? Browse other questions tagged or ask your own question.