Iterating over years for features in public feature collection using GEE?

2017-09-19 11:09:50

I want to calculate the surfaces deforested every year for every protected area in Democratic Republic of the Congo. I am building from the script provided as answer by Rodrigo Principe in reply to this similar question. But this example used a private shapefile loaded in assets. When I try to reproduce this solution with a public dataset (in-land protected areas in DRC, so my question somehow completes the official GEE tutorial on quantigfying deforestation in DRC), it doesn't work : output "areas" remain desesperatelly empty.

The code bellow is the same as proposed by Rodrigo Principe, except the lines marked with an"// EDIT" comment. Does anyone knows how to fix it?

// Load and filter the Hansen data

// EDIT : The source in following line has been updated to load v1_3

var gfc2014 = ee.Image('UMD/hansen/global_forest_change_2015_v1_3')

// END EDIT

.select(['treecover2000','loss','gain','lossyear']);

// list for filter iteration

var years =