I'm trying to apply a rule to NOOA NDVI the already classified region to only display dense vegetation areas but it's saying NDVI is not a function.
Here is the code:
//collecting data using ndvi
var good = ee.ImageCollection('NOAA/CDR/AVHRR/NDVI/V5')
.filter(ee.Filter.date('2018-05-01', '2018-06-01'))
//.median()
//.good.lt(0.27).and(good.gt(0.18))
//.map(function(good){return good.lt(0.18).and(good.gt(0.27))})
.map(function(good){return good.clip(roi)});
Map.setCenter (37.577717495842506,0.3597340638009545,12);
var ndvi = good.select('NDVI')
var ndvi2 =ndvi
.where(ndvi.gt(0.27).and(ndvi.lte(0.36)), 4)
.where(ndvi.gt(0.36).and(ndvi.lte(0.74)), 5)
var ndvi2 = ndvi2.clip(roi);
The error shows this
Line 14: ndvi.gt is not a function