I have a script that provides the latest event/alert from the RADD dataset. I would like to extract events from a date range, e.g. 2020-01-01 to 2021-12-31. How should I go about this?

This is the script I have:

var radd = ee.ImageCollection('projects/radar-wur/raddalert/v1')

var studyArea = ee.FeatureCollection(table).geometry();

var empty = ee.Image().byte();
var outline = empty.paint({
  featureCollection: table,
  color: 1,
  width: 1
Map.addLayer(outline, {palette: '0000FF'}, 'Study Area');
Map.centerObject(table, 11);
//Access RADD image collection

var geography = 'asia' // 'sa' (south america), 'africa' (africa), 'asia' (asia & pacific)

print('RADD image collection:', radd)

//Forest baseline 
//Primary humid tropical forest mask 2001 from Turubanova et al (2018) with annual (Africa: 2001-2018; Asia: 2001 - 2019) forest loss (Hansen et al 2013) and mangroves (Bunting et al 2018) removed
var forest_baseline = ee.Image(radd.filterMetadata('layer','contains','forest_baseline')

print('Forest baseline '+ geography + ':',  forest_baseline);

Map.addLayer(forest_baseline, {palette:['black'], opacity: 0.3},'Forest baseline');

//Latest RADD alert
var latest_radd_alert =  ee.Image(radd.filterMetadata('layer','contains','alert')
                            .sort('system:time_end', false).first());

print('Latest RADD alert '+ geography+':',latest_radd_alert)

//RADD alert: 2 = unconfirmed (low confidence) alert; 3 = confirmed (high confidence) alert
Map.addLayer(latest_radd_alert.select('Alert').clip(table), {min:2,max:3,palette:['blue','coral']}, 'RADD alert')

//RADD alert date: YYDOY (Year-Year-Day-Of-Year)
Map.addLayer(latest_radd_alert.select('Date').clip(table), {min:19000,max:21000, palette: ['ffffcc','800026']}, 'RADD alert date')


if (geography =='sa') {Map.setCenter(-75.5,-6.5,12)}
if (geography =='africa') {Map.setCenter(16,4,12)}
// if (geography =='asia') {Map.setCenter(133.1,-3.2,12)}

1 Answer 1


As describe at the comment "RADD alert date: YYDOY (Year-Year-Day-Of-Year)", you can change the code as

Map.addLayer(latest_radd_alert.select('Date').clip(table), {min:20000,max:21365, palette: ['ffffcc','800026']}, 'RADD alert date')

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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