Earth at Night, Mountains of Light

What if Earth’s terrain was created by nighttime lights?

Japan at night

Recently I worked on a 3D JavaScript mapping experiment where the luminance of light emissions captured in satellite imagery raises and sculpts new mountain ranges across the globe.  Brighter areas become high peaks, while darker regions flatten into valleys and plains.

Note: This post could have been written in puns alone, but I’m going to hold myself back from that and try to be a good person.  But I mean if you want me to shed some *light* on the situation and step out of the *shadows*, this wasn’t a *night*mare to make…

Another note: I believe Sarah coined the term “mountains of light“.  I like it, thanks!

Here’s the general workflow of how the code works:

  1. Create a custom elevation layer with the ArcGIS API for JavaScript.
  2. Get that elevation layer wired up to Nasa’s nighttime lights satellite imagery server.
    1. Ok fine, if you really want to geek out with me, it comes from the Suomi-NPP VIIRS sensor.
    2. The polished and cleaned up pixels are called “Black Marble” and provide a 500m image resolution.
    3. This isn’t live data but rather a static composite of images taken at different times.  Joshua Stevens and Rob Simmons helped me get a better understanding of the hard work that went in to creating and cleaning up this raw imagery into a beautiful worldwide dataset.
  3. Back to the code: for every nighttime light pixel, convert the visual color ramp that goes from dark blue/black to yellow/white into a simple 0-1 number range.  For this I used the chroma.js “luminance” calculation.
  4. Take the 0-1 number value and multiply it by some huge number!  We don’t want 1 meter tall mounds, we want wild and exaggerated mountains reaching high into the sky.
  5. Drape anything you want on top of this fake terrain.  In this case it made sense to also put the nighttime lights imagery on top of the terrain that it generated.

This is a view of northern India, the Himalaya, Nepal, Bhutan, and the Tibetan plateau with our fake mountains at night.

Earth at Night: Himalaya night

If we drape daytime satellite imagery over this synthetic terrain it is hard not to notice something is a bit off with the Himalaya.  Viewing the Earth this way wasn’t the original intent of the app, but it is fun to look at if you don’t mind the headache.

Earth at Night: Himalaya day

Not gonna lie, I’m also pretty damn hyped that this JavaScript dataviz experiment made it on to Kenneth Field’s “Favourite maps from 2018” and was also featured on Nathan Yau’s FlowingData and John Metcalfe‘s Washington Post article.  Thank you all very much!

And here’s a bunch of other links to keep you going down the rabbit hole.

Visit the app here: https://jwasilgeo.github.io/esri-experiments/earth-at-night/