Night Light Maps (Study Area: South Asia)

It is always wonderful to look at the globe with different prescriptive. In this tutorial, we will look at the nightlight map of the world. We will zoom at South Asian countries (Nepal, India, Bhutan, Pakistan, Bangladesh, Afghanistan, and Myanmar) to look at nightlight activity. You may want to change the country name and look at different countries as you please.

About the Data

This data was obtained from the Defense Meteorological Program (DMSP) Operational Line-Scan System (OLS). DMSP data collected by US Air Force Weather Agency. Image and data processing by NOAA’s National Geophysical Data Center. It is now available in Google Earth Engine. The DMSP-OLS has a unique capability to detect visible and near-infrared (VNIR) emission sources at night.

This collection contains global nighttime lights images with no sensor saturation. The sensor is typically operated at a high-gain setting to enable the detection of moonlit clouds. However, with six bit quantization and limited dynamic range, the recorded data are saturated in the bright cores of urban centers. A limited set of observations at low lunar illumination were obtained where the gain of the detector was set significantly lower than its typical operational setting (sometimes by a factor of 100). Sparse data acquired at low-gain settings were combined with the operational data acquired at high-gain settings to produce the set of global nighttime lights images with no sensor saturation. Data from different satellites were merged and blended into the final product in order to gain maximum coverage. For more information, see this read me file from the provider.

The DMSP-OLS has two Bands: avg_vis and cf_cvg of 30 arc seconds resolution.

The avg_vis is average digital band numbers from observations with cloud-free light detection. The avg_vis band value ranges from min 0 to max 6060.6.
The cf_avg is Cloud-free coverage, the total number of observations that went into each 30-arc second grid cell. This image can be used to identify areas with low numbers of observations where the quality is reduced. The estimated min and max values range from 0 to 175.

In this tutorial, we will try to develop a Linear Fit Model and try to determine the trend of nighttime lights from DMSP data. This code was originally published in GEE example. The code was edited and modified as per the requirement of this tutorial.

Linear Fit Nightlight Map of South Asian Countries.

Let’s jump into the code:

/// Use Linear Fit Model to map the Nighttime Lights across the world! 

// Slect your country
var countries = ee.FeatureCollection("ft:1tdSwUL7MVpOauSgRzqVTOwdfy17KDbw-1d9omPw")
//var country_name = ['China']
//var country_name = ['United States']
var country_name = ['Nepal', 'India', 'Pakistan', 'Bangladesh', 'Bhutan', 'Afghanistan', 'Myanmar']
var country = countries.filter(ee.Filter.inList('Country', country_name));

Map.centerObject(country,4.5);  //Zoom to Study area

// Load a global elevation image. This layer is added just to add beauty to the map visualization
var elev = ee.Image('USGS/GMTED2010')

// Add the elevation to the map.
Map.addLayer(elev, {}, 'elevation b/w');

// Compute the trend of nighttime lights from DMSP.

// Add a band containing image date as years since 1990.
function createTimeBand(img) {
  var year = img.date().difference(ee.Date('1990-01-01'), 'year');
  return ee.Image(year).float().addBands(img);
}

// Fit a linear trend to the nighttime lights collection.
var collection = ee.ImageCollection('NOAA/DMSP-OLS/CALIBRATED_LIGHTS_V4')
    .select('avg_vis')
    .map(createTimeBand);
var fit = collection.reduce(ee.Reducer.linearFit());

// Display a single image
Map.addLayer(ee.Image(collection.select('avg_vis').first()),
         {min: 0, max: 63},
         'stable lights first asset', false);

// Display trend in red/blue, brightness in green.
//Map.setCenter(30, 45, 4);
Map.addLayer(fit.clip(country),
         {min: 0, max: [0.18, 20, -0.18], bands: ['scale', 'offset', 'scale']},
         'stable lights trend');

Map.add(ui.Label(
    'Night Light Map of '+country_name,
    {
      fontWeight: 'bold', 
      //fontColors: 'red',
      BackgroundColor: 'F8E60A',
      //.paint(roi, 'fill')
      fontSize: '14px'}));

Additional Maps


2 thoughts on “Night Light Maps (Study Area: South Asia)”

Leave a Reply

%d bloggers like this: