I'd like to use the hansen forest cover dataset and the Resolve ecoregions database to sum forest areas across biomes. The Resolve dataset has many polygons, but the "BIOME_NAME" column is repeated across many of them, such that there are only 13 biomes across the globe. I would like to sum the forest area in each biome.
I'm sure there's some way to do this with reduceRegions, but I'm not sure how to confine the analysis across biomes, and not for each and every polygon. At present, the code below results in an error when calculating the final dictionary.
https://code.earthengine.google.com/2a60e1ddacbafdcb70b1bffb59811812
var gfc2018 = ee.Image("UMD/hansen/global_forest_change_2018_v1_6"),
resolve = ee.FeatureCollection("RESOLVE/ECOREGIONS/2017");
var fc2000_pct = gfc2018.select(0).divide(100)
// Get scale (in meters) information from band 0.
var b0scale = gfc2018.select(0).projection().nominalScale();
print('Band 0 scale: ', b0scale); // ee.Number
var forest_area_per_pixel = fc2000_pct.multiply(b0scale)
// now to aggregate by biome...
var forest_area_per_biome = forest_area_per_pixel.reduceRegion({
reducer: ee.Reducer.sum(),
geometry: resolve.geometry(),
scale: b0scale,
maxPixels: 1e9
});
print(forest_area_per_biome);