Skip to content

Instantly share code, notes, and snippets.

@henrique
Last active January 4, 2020 11:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save henrique/49dc40a84f21e004a91b9c74b28b8d79 to your computer and use it in GitHub Desktop.
Save henrique/49dc40a84f21e004a91b9c74b28b8d79 to your computer and use it in GitHub Desktop.
// GRID3 population data
var img_pop3 = ee.ImageCollection('users/henrique/GRID3_NGA_PopEst_v1_1_mean_float')
// Nigerian nightlights (1Y median)
var nighttime = ee.ImageCollection('NOAA/VIIRS/DNB/MONTHLY_V1/VCMSLCFG')
.filter(ee.Filter.date('2018–09–01', '2019–09–30'))
.median()
.select('avg_rad')
.clipToCollection(nigeria);
// Demand layer
var demand = img_pop3.gte(pop_threshold) // threshold population
.multiply(nighttime.lte(light_threshold)) // population without lights
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment