Get the stats of your primitive

From a histogram


var referenceData = ee.FeatureCollection("users/servirmekong/cambodia/paddyRice")

// import feature collection
var table = ee.FeatureCollection("users/servirmekong/countries/KHM_adm1");
// import surface reflectance composite
var composites = ee.ImageCollection("projects/servir-mekong/yearlyComposites");

// filter for province
var province = "Batdâmbâng";

// select province from feature collection
var myProvince = table.filter(ee.Filter.eq("NAME_1","Batdâmbâng"));

// filter image for date
var image = ee.Image(composites.filterDate("2002-01-01","2002-12-31").first());

// add image to map

var trainingSample = image.sampleRegions(referenceData,["land_class"],30);

var bandNames = image.bandNames();
var classifier = ee.Classifier.randomForest(100,0).setOutputMode('PROBABILITY').train(trainingSample,"land_class",bandNames);

var classification = ee.Image(image.classify(classifier).multiply(100).clip(myProvince));


// import lc feature collection
var lc = ee.FeatureCollection("users/servirmekong/cambodia/Landuse2002");

// filter for paddy rice
var rice = lc.filter(ee.Filter.eq("NAME","Paddy field"));

// add the rice features

// add the chart


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s