I am trying to calculate the population in a country as follows:
//Population per square km:
var pop_count = ee.ImageCollection("CIESIN/GPWv411/GPW_Population_Count").filter(ee.Filter.date('2020-01-01', '2020-12-31')).mean();
//Country specified:
var country = ee.FeatureCollection("FAO/GAUL_SIMPLIFIED_500m/2015/level0").filter(ee.Filter.eq('ADM0_NAME', 'South Africa'))
//Population in entire country
var pop_country = pop_count.reduceRegion({
reducer: ee.Reducer.sum(),
geometry: country.geometry(),
//scale: ???
})
I get an error if I don't specify scale, but I want one number (population) for the entire country. What scale should I specify?