working with worldpop

population dynamics

Question 1:

copy the code below into the earth engine code editor and hit run

// import worldpop data
var wp = ee.Image("WorldPop/GP/100m/pop/KHM_2020");
// add to map

Try to answer the following questions

  1. What is the date of the image?
  2. what is the spatial resolution?
  3. What is the unit of the data?

Question 2:

copy the code below into the earth engine code editor and hit run

// import worldpop data
var wp2000 = ee.Image("WorldPop/GP/100m/pop/KHM_2000");
// add to map

// import worldpop data
var wp2020 = ee.Image("WorldPop/GP/100m/pop/KHM_2020");
 // add to map

Try to answer the following questions

  1. where do we see the main differences in the imagery?
  2. do you see any image artifacts?

Question 3:

Draw an area around Phnom Penh

copy the code below into the previous code and hit run


Try to answer the following questions

  1. why do we use the sum in this example?
  2. what is the estimated population in Siem Reap?

Question 4

Use the code below to calculate the population for each province

// define the countries of interest 
var cambodia = ee.FeatureCollection("projects/servir-mekong/admin/KHM_adm1")

// import worldpop data
var wp = ee.ImageCollection("WorldPop/GP/100m/pop").filterBounds(cambodia);

// set the start and end dates
var start = ee.Date.fromYMD(2020,1,1);
var end = ee.Date.fromYMD(2020,12,31);

// filter for the period of interest
var wp2020 = ee.Image(wp.filterDate(start,end).mean());

// clip for the area of interest
wp2020 = wp2020.clip(cambodia);

Map.addLayer(wp2020,{min:0,max:100,palette:['white','gray','black']},"population 2020");

var totalPopulation = wp2020.reduceRegion({reducer:ee.Reducer.sum(),scale:100,geometry:cambodia,maxPixels:1e13})
print("Total Population:",totalPopulation)

var chart =
          regions: cambodia,
          reducer: ee.Reducer.sum(),
          scale: 100,
          xProperty: 'NAME_1'
          title: 'population per provinces',
          hAxis: {title: 'Date', titleTextStyle: {italic: false, bold: true}},
          vAxis: {
            title: 'total population',
            titleTextStyle: {italic: false, bold: true}
          lineWidth: 5,
          colors: ['e37d05'],
          curveType: 'function'

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